X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=server.h;h=1d717035951a9d643257265279d95cc9d79e0260;hb=9ceac1fc17ed0b0e15906b11e1c6819c2264419b;hp=4105076a1437920a10dc7b623b5286fd0d80e93e;hpb=1e6375f21ca24d406643b6ab57ab8fa55eb917cf;p=xonotic%2Fdarkplaces.git diff --git a/server.h b/server.h index 4105076a..1d717035 100644 --- a/server.h +++ b/server.h @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. typedef struct server_static_s { // number of svs.clients slots (updated by maxplayers command) - int maxclients; + int maxclients, maxclients_next; // client slots struct client_s *clients; // episode completion information @@ -48,6 +48,12 @@ typedef struct server_static_s float perf_acc_offset_squared; float perf_acc_offset_max; int perf_acc_offset_samples; + + // csqc stuff + unsigned char *csqc_progdata; + size_t csqc_progsize_deflated; + unsigned char *csqc_progdata_deflated; + } server_static_t; //============================================================================= @@ -68,6 +74,7 @@ typedef struct server_s qboolean active; qboolean paused; + double pausedstart; // handle connections specially qboolean loadgame; @@ -147,8 +154,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 @@ -196,8 +215,8 @@ typedef struct client_s // this is used by sv_clmovement_minping code double clmovement_disabletimeout; - // this is used by sv_clmvoement_waitforinput code - int clmovement_skipphysicsframes; + // this is used by sv_clmovement_inputtimeout code + float clmovement_inputtimeout; // spawn parms are carried from level to level float spawn_parms[NUM_SPAWN_PARMS]; @@ -215,8 +234,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 +277,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; @@ -352,7 +381,7 @@ extern cvar_t sv_checkforpacketsduringsleep; extern cvar_t sv_clmovement_enable; extern cvar_t sv_clmovement_minping; extern cvar_t sv_clmovement_minping_disabletime; -extern cvar_t sv_clmovement_waitforinput; +extern cvar_t sv_clmovement_inputtimeout; extern cvar_t sv_cullentities_nevercullbmodels; extern cvar_t sv_cullentities_pvs; extern cvar_t sv_cullentities_stats; @@ -377,12 +406,14 @@ extern cvar_t sv_gameplayfix_easierwaterjump; extern cvar_t sv_gameplayfix_findradiusdistancetobox; extern cvar_t sv_gameplayfix_grenadebouncedownslopes; extern cvar_t sv_gameplayfix_multiplethinksperframe; +extern cvar_t sv_gameplayfix_slidemoveprojectiles; extern cvar_t sv_gameplayfix_noairborncorpse; extern cvar_t sv_gameplayfix_setmodelrealbox; 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;