]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - server.h
added sv_gameplayfix_blowupfallenzombies and sv_gameplayfix_findradiusdistancetobox...
[xonotic/darkplaces.git] / server.h
index d369777312bc8ce3b862a6b341086e62277a29e8..770be3f7e9949e09c75e6919957599bbfc4be85a 100644 (file)
--- a/server.h
+++ b/server.h
@@ -69,10 +69,14 @@ typedef struct
        char modelname[64];
        struct model_s *worldmodel;
        // NULL terminated
-       char *model_precache[MAX_MODELS];
+       // LordHavoc: precaches are now MAX_QPATH rather than a pointer
+       // updated by SV_ModelIndex
+       char model_precache[MAX_MODELS][MAX_QPATH];
        struct model_s *models[MAX_MODELS];
        // NULL terminated
-       char *sound_precache[MAX_SOUNDS];
+       // LordHavoc: precaches are now MAX_QPATH rather than a pointer
+       // updated by SV_SoundIndex
+       char sound_precache[MAX_SOUNDS][MAX_QPATH];
        char *lightstyles[MAX_LIGHTSTYLES];
        int num_edicts;
        int max_edicts;
@@ -156,6 +160,8 @@ typedef struct client_s
        char name[64], old_name[64];
        int colors, old_colors;
        int frags, old_frags;
+       char playermodel[MAX_QPATH], old_model[MAX_QPATH];
+       char playerskin[MAX_QPATH], old_skin[MAX_QPATH];
 
        // visibility state
        float visibletime[MAX_EDICTS];
@@ -163,6 +169,9 @@ typedef struct client_s
        // prevent animated names
        float nametime;
 
+       // latest received clc_ackframe (used to detect packet loss)
+       int latestframenum;
+
        entityframe_database_t *entitydatabase;
        entityframe4_database_t *entitydatabase4;
        entityframe5_database_t *entitydatabase5;
@@ -267,9 +276,11 @@ extern cvar_t sv_gameplayfix_noairborncorpse;
 extern cvar_t sv_gameplayfix_stepdown;
 extern cvar_t sv_gameplayfix_stepwhilejumping;
 extern cvar_t sv_gameplayfix_swiminbmodels;
+extern cvar_t sv_gameplayfix_setmodelrealbox;
+extern cvar_t sv_gameplayfix_blowupfallenzombies;
+extern cvar_t sv_gameplayfix_findradiusdistancetobox;
 
-extern mempool_t *sv_clients_mempool;
-extern mempool_t *sv_edicts_mempool;
+extern mempool_t *sv_mempool;
 
 // persistant server info
 extern server_static_t svs;
@@ -296,7 +307,12 @@ void SV_ClearDatagram (void);
 
 void SV_ReadClientMessage(void);
 
-int SV_ModelIndex (const char *name);
+// precachemode values:
+// 0 = fail if not precached,
+// 1 = warn if not found and precache if possible
+// 2 = precache
+int SV_ModelIndex(char *s, int precachemode);
+int SV_SoundIndex(char *s, int precachemode);
 
 void SV_SetIdealPitch (void);
 
@@ -315,7 +331,7 @@ qboolean SV_PlayerCheckGround (edict_t *ent);
 qboolean SV_CheckBottom (edict_t *ent);
 qboolean SV_movestep (edict_t *ent, vec3_t move, qboolean relink);
 
-void SV_WriteClientdataToMessage (edict_t *ent, sizebuf_t *msg);
+void SV_WriteClientdataToMessage (client_t *client, edict_t *ent, sizebuf_t *msg, int *stats);
 
 void SV_MoveToGoal (void);