]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - server.h
ZQ_PAUSE extension patch from GreEn`mArine
[xonotic/darkplaces.git] / server.h
index 4105076a1437920a10dc7b623b5286fd0d80e93e..99c5296d263be02a4519cf44a195623191f8cc3a 100644 (file)
--- a/server.h
+++ b/server.h
@@ -68,6 +68,7 @@ typedef struct server_s
        qboolean active;
 
        qboolean paused;
+       double pausedstart;
        // handle connections specially
        qboolean loadgame;
 
@@ -86,6 +87,9 @@ typedef struct server_s
        int csqc_progcrc; // -1 = no progs
        int csqc_progsize; // -1 = no progs
        char csqc_progname[MAX_QPATH]; // copied from csqc_progname at level start
+       unsigned char *csqc_progdata;
+       size_t csqc_progsize_deflated;
+       unsigned char *csqc_progdata_deflated;
 
        // collision culling data
        world_t world;
@@ -147,8 +151,20 @@ typedef struct server_s
        int sententitiesmark;
        int sententities[MAX_EDICTS];
        int sententitiesconsideration[MAX_EDICTS];
+
+       // legacy support for self.Version based csqc entity networking
+       unsigned char csqcentityversion[MAX_EDICTS]; // legacy
 } server_t;
 
+#define NUM_CSQCENTITIES_PER_FRAME 1024
+typedef struct csqcentityframedb_s
+{
+       int framenum;
+       int num;
+       unsigned short entno[NUM_CSQCENTITIES_PER_FRAME];
+       int sendflags[NUM_CSQCENTITIES_PER_FRAME];
+} csqcentityframedb_t;
+
 // if defined this does ping smoothing, otherwise it does not
 //#define NUM_PING_TIMES 16
 
@@ -215,8 +231,17 @@ typedef struct client_s
        // visibility state
        float visibletime[MAX_EDICTS];
 
-       // version number of csqc-based entity to decide whether to send it
-       unsigned char csqcentityversion[MAX_EDICTS];
+       // scope is whether an entity is currently being networked to this client
+       // sendflags is what properties have changed on the entity since the last
+       // update that was sent
+       int csqcnumedicts;
+       unsigned char csqcentityscope[MAX_EDICTS];
+       unsigned int csqcentitysendflags[MAX_EDICTS];
+
+#define NUM_CSQCENTITYDB_FRAMES 64
+       unsigned char csqcentityglobalhistory[MAX_EDICTS]; // set to 1 if the entity was ever csqc networked to the client, and never reset back to 0
+       csqcentityframedb_t csqcentityframehistory[NUM_CSQCENTITYDB_FRAMES];
+       int csqcentityframehistory_next;
 
        // prevent animated names
        float nametime;
@@ -249,6 +274,7 @@ typedef struct client_s
        int download_expectedposition; // next position the client should ack
        qboolean download_started;
        char download_name[MAX_QPATH];
+       qboolean download_deflate;
 
        // fixangle data
        qboolean fixangle_angles_set;
@@ -383,6 +409,7 @@ extern cvar_t sv_gameplayfix_stepdown;
 extern cvar_t sv_gameplayfix_stepwhilejumping;
 extern cvar_t sv_gameplayfix_swiminbmodels;
 extern cvar_t sv_gameplayfix_upwardvelocityclearsongroundflag;
+extern cvar_t sv_gameplayfix_gravityunaffectedbyticrate;
 extern cvar_t sv_gravity;
 extern cvar_t sv_idealpitchscale;
 extern cvar_t sv_jumpstep;