]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - client.h
fixed stair smoothing code so it no longer jitters when riding lifts
[xonotic/darkplaces.git] / client.h
index 01d443301dc1563a7aa43f22fe80a03ac4ca4f5e..f53943dcb6aa045e6fe0ba001a333549fb1e6892 100644 (file)
--- a/client.h
+++ b/client.h
@@ -150,11 +150,7 @@ typedef struct dlight_s
        // color of light
        // (worldlight: saved to .rtlights file)
        vec3_t color;
-       // cubemap number to use on this light
-       // (dlight only)
-       int cubemapnum;
        // cubemap name to use on this light
-       // (worldlight only)
        // (worldlight: saved to .rtlights file)
        char cubemapname[64];
        // make light flash while selected
@@ -201,7 +197,7 @@ typedef struct dlight_s
        // (worldlight only)
        struct dlight_s *next;
        // embedded rtlight struct for renderer
-       // (renderer only)
+       // (worldlight only)
        rtlight_t rtlight;
 }
 dlight_t;
@@ -666,7 +662,8 @@ typedef struct client_state_s
        // use pain anim frame if cl.time < this
        float faceanimtime;
        // for stair smoothing
-       float stairoffset;
+       float stairsmoothz;
+       double stairsmoothtime;
 
        // color shifts for damage, powerups
        cshift_t cshifts[NUM_CSHIFTS];
@@ -751,15 +748,11 @@ typedef struct client_state_s
        // the timestamp of the last two messages
        double mtime[2];
 
-       // similar to cl.time but this can go past cl.mtime[0] when packets are
-       // not being received, it is still clamped to the cl.mtime[1] to
-       // cl.mtime[0] range whenever a packet is received, it just does not stop
-       // when interpolation finishes
-       double timenonlerp;
-
        // clients view of time, time should be between mtime[0] and mtime[1] to
        // generate a lerp point for other data, oldtime is the previous frame's
        // value of time, frametime is the difference between time and oldtime
+       // note: cl.time may be beyond cl.mtime[0] if packet loss is occuring, it
+       // is only forcefully limited when a packet is received
        double time, oldtime;
        // how long it has been since the previous client frame in real time
        // (not game time, for that use cl.time - cl.oldtime)
@@ -935,6 +928,11 @@ typedef struct client_state_s
        int qw_validsequence;
 
        int qw_deltasequence[QW_UPDATE_BACKUP];
+
+       // csqc stuff:
+
+       // collision culling data
+       world_t world;
 }
 client_state_t;
 
@@ -967,6 +965,7 @@ extern cvar_t cl_autofire;
 
 extern cvar_t cl_shownet;
 extern cvar_t cl_nolerp;
+extern cvar_t cl_nettimesyncmode;
 
 extern cvar_t cl_pitchdriftspeed;
 extern cvar_t lookspring;
@@ -997,7 +996,7 @@ extern cvar_t cl_prydoncursor;
 
 extern client_state_t cl;
 
-extern void CL_AllocDlight (entity_render_t *ent, matrix4x4_t *matrix, float radius, float red, float green, float blue, float decay, float lifetime, int cubemapnum, int style, int shadowenable, vec_t corona, vec_t coronasizescale, vec_t ambientscale, vec_t diffusescale, vec_t specularscale, int flags);
+extern void CL_AllocLightFlash (entity_render_t *ent, matrix4x4_t *matrix, float radius, float red, float green, float blue, float decay, float lifetime, int cubemapnum, int style, int shadowenable, vec_t corona, vec_t coronasizescale, vec_t ambientscale, vec_t diffusescale, vec_t specularscale, int flags);
 
 //=============================================================================
 
@@ -1053,7 +1052,7 @@ void CL_SetInfo(const char *key, const char *value, qboolean send, qboolean allo
 
 int  CL_ReadFromServer (void);
 void CL_WriteToServer (void);
-void CL_Move (void);
+void CL_Input (void);
 extern qboolean cl_ignoremousemove;
 
 
@@ -1170,6 +1169,7 @@ effectnameindex_t;
 int CL_ParticleEffectIndexForName(const char *name);
 const char *CL_ParticleEffectNameForIndex(int i);
 void CL_ParticleEffect(int effectindex, float pcount, const vec3_t originmins, const vec3_t originmaxs, const vec3_t velocitymins, const vec3_t velocitymaxs, entity_t *ent, int palettecolor);
+void CL_ParticleTrail(int effectindex, float pcount, const vec3_t originmins, const vec3_t originmaxs, const vec3_t velocitymins, const vec3_t velocitymaxs, entity_t *ent, int palettecolor, qboolean spawndlight, qboolean spawnparticles);
 void CL_ParseParticleEffect (void);
 void CL_ParticleCube (const vec3_t mins, const vec3_t maxs, const vec3_t dir, int count, int colorbase, vec_t gravity, vec_t randomvel);
 void CL_ParticleRain (const vec3_t mins, const vec3_t maxs, const vec3_t dir, int count, int colorbase, int type);
@@ -1254,7 +1254,7 @@ typedef struct r_refdef_s
        int maxentities;
 
        // renderable dynamic lights
-       dlight_t *lights[MAX_DLIGHTS];
+       rtlight_t lights[MAX_DLIGHTS];
        int numlights;
 
        // 8.8bit fixed point intensities for light styles