]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - server.h
redesigned csqc shared entity .Version handling, now internally uses a
[xonotic/darkplaces.git] / server.h
index 6e268803b309b805383d053323740ccaa11920c0..15b7c3d06763e34800b4e5f9ecb500757fe4b26b 100644 (file)
--- a/server.h
+++ b/server.h
@@ -147,6 +147,9 @@ 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;
 
 // if defined this does ping smoothing, otherwise it does not
@@ -215,8 +218,12 @@ 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];
 
        // prevent animated names
        float nametime;
@@ -228,6 +235,9 @@ typedef struct client_s
        char weaponmodel[MAX_QPATH];
        int weaponmodelindex;
 
+       // clientcamera (entity to use as camera)
+       int clientcamera;
+
        entityframe_database_t *entitydatabase;
        entityframe4_database_t *entitydatabase4;
        entityframe5_database_t *entitydatabase5;
@@ -369,6 +379,7 @@ extern cvar_t sv_friction;
 extern cvar_t sv_gameplayfix_blowupfallenzombies;
 extern cvar_t sv_gameplayfix_delayprojectiles;
 extern cvar_t sv_gameplayfix_droptofloorstartsolid;
+extern cvar_t sv_gameplayfix_droptofloorstartsolid_nudgetocorrect;
 extern cvar_t sv_gameplayfix_easierwaterjump;
 extern cvar_t sv_gameplayfix_findradiusdistancetobox;
 extern cvar_t sv_gameplayfix_grenadebouncedownslopes;
@@ -464,12 +475,16 @@ qboolean SV_movestep (prvm_edict_t *ent, vec3_t move, qboolean relink, qboolean
 // if touchtriggers, calls prog functions for the intersected triggers
 void SV_LinkEdict (prvm_edict_t *ent, qboolean touch_triggers);
 
+// move an entity that is stuck by small amounts in various directions to try to nudge it back into the collision hull
+// returns true if it found a better place
+qboolean SV_UnstickEntity (prvm_edict_t *ent);
+
 // calculates hitsupercontentsmask for a generic qc entity
 int SV_GenericHitSuperContentsMask(const prvm_edict_t *edict);
 // traces a box move against worldmodel and all entities in the specified area
 trace_t SV_Move(const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int type, prvm_edict_t *passedict, int hitsupercontentsmask);
 
-#define SV_PointSuperContents(point) (SV_Move((point), vec3_origin, vec3_origin, (point), sv_gameplayfix_swiminbmodels.integer ? MOVE_NOMONSTERS : MOVE_WORLDONLY, NULL, 0).startsupercontents)
+int SV_PointSuperContents(const vec3_t point);
 
 void SV_FlushBroadcastMessages(void);
 void SV_WriteClientdataToMessage (client_t *client, prvm_edict_t *ent, sizebuf_t *msg, int *stats);