double last_trace_visibility;
// user wavefunc parameters (from csqc)
- float userwavefunc_param[Q3WAVEFUNC_USER_COUNT];
+ vec_t userwavefunc_param[Q3WAVEFUNC_USER_COUNT];
}
entity_render_t;
typedef struct entity_persistent_s
{
- vec3_t trail_origin;
-
- // particle trail
- float trail_time;
+ vec3_t trail_origin; // previous position for particle trail spawning
+ vec3_t oldorigin; // lerp
+ vec3_t oldangles; // lerp
+ vec3_t neworigin; // lerp
+ vec3_t newangles; // lerp
+ vec_t lerpstarttime; // lerp
+ vec_t lerpdeltatime; // lerp
+ float muzzleflash; // muzzleflash intensity, fades over time
+ float trail_time; // residual error accumulation for particle trail spawning (to keep spacing across frames)
qboolean trail_allowed; // set to false by teleports, true by update code, prevents bad lerps
-
- // muzzleflash fading
- float muzzleflash;
-
- // interpolated movement
-
- // start time of move
- float lerpstarttime;
- // time difference from start to end of move
- float lerpdeltatime;
- // the move itself, start and end
- float oldorigin[3];
- float oldangles[3];
- float neworigin[3];
- float newangles[3];
}
entity_persistent_t;
int proquake_servermod; // 0 = not proquake, 1 = proquake
int proquake_serverversion; // actual proquake server version * 10 (3.40 = 34, etc)
int proquake_serverflags; // 0 (PQF_CHEATFREE not supported)
+
+ // don't write-then-read csprogs.dat (useful for demo playback)
+ unsigned char *caughtcsprogsdata;
+ fs_offset_t caughtcsprogsdatasize;
}
client_static_t;
float bob2_smooth;
float bobfall_speed;
float bobfall_swing;
+ double calcrefdef_prevtime;
// don't change view angle, full screen, etc
int intermission;
void V_StopPitchDrift (void);
void V_Init (void);
-float V_CalcRoll (vec3_t angles, vec3_t velocity);
+float V_CalcRoll (const vec3_t angles, const vec3_t velocity);
void V_UpdateBlends (void);
void V_ParseDamage (void);
extern r_refdef_t r_refdef;
+typedef enum waterlevel_e
+{
+ WATERLEVEL_NONE,
+ WATERLEVEL_WETFEET,
+ WATERLEVEL_SWIMMING,
+ WATERLEVEL_SUBMERGED
+}
+waterlevel_t;
+
+typedef struct cl_clientmovement_state_s
+{
+ // entity to be ignored for movement
+ struct prvm_edict_s *self;
+ // position
+ vec3_t origin;
+ vec3_t velocity;
+ // current bounding box (different if crouched vs standing)
+ vec3_t mins;
+ vec3_t maxs;
+ // currently on the ground
+ qboolean onground;
+ // currently crouching
+ qboolean crouched;
+ // what kind of water (SUPERCONTENTS_LAVA for instance)
+ int watertype;
+ // how deep
+ waterlevel_t waterlevel;
+ // weird hacks when jumping out of water
+ // (this is in seconds and counts down to 0)
+ float waterjumptime;
+
+ // user command
+ usercmd_t cmd;
+}
+cl_clientmovement_state_t;
+void CL_ClientMovement_PlayerMove_Frame(cl_clientmovement_state_t *s);
+
// warpzone prediction hack (CSQC builtin)
void CL_RotateMoves(const matrix4x4_t *m);
void V_DriftPitch(void);
void V_FadeViewFlashs(void);
void V_CalcViewBlend(void);
+void V_CalcRefdefUsing (const matrix4x4_t *entrendermatrix, const vec3_t clviewangles, qboolean teleported, qboolean clonground, qboolean clcmdjump, float clstatsviewheight, qboolean cldead, qboolean clintermission, const vec3_t clvelocity);
void V_CalcRefdef(void);
void CL_Locs_Reload_f(void);