]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - client.h
replaced cl.movement_queue with direct use of cl.movecmd array, this
[xonotic/darkplaces.git] / client.h
index 543c9b7b7d287ee44c78f949840254ebbdbdeb0b..b71c26394c3d723e837bb21b6f9133e394af0fea 100644 (file)
--- a/client.h
+++ b/client.h
@@ -27,9 +27,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 // LordHavoc: 256 dynamic lights
 #define MAX_DLIGHTS 256
 
-// this is the maximum number of input packets that can be lost without a
-// misprediction
-#define CL_MAX_USERCMDS 16
+// this is the maximum number of input packets that can be predicted
+#define CL_MAX_USERCMDS 256
 
 // flags for rtlight rendering
 #define LIGHTFLAG_NORMALMODE 1
@@ -358,12 +357,18 @@ typedef struct usercmd_s
 
        double time;
        double receivetime;
-       int msec; // for qw moves
+       int msec; // for predicted moves
        int buttons;
        int impulse;
        int sequence;
        qboolean applied; // if false we're still accumulating a move
        qboolean predicted; // if true the sequence should be sent as 0
+
+       // derived properties
+       double frametime;
+       qboolean canjump;
+       qboolean jump;
+       qboolean crouch;
 } usercmd_t;
 
 typedef struct lightstyle_s
@@ -485,6 +490,14 @@ typedef struct cl_downloadack_s
 }
 cl_downloadack_t;
 
+typedef struct cl_soundstats_s
+{
+       int mixedsounds;
+       int totalsounds;
+       int latency_milliseconds;
+}
+cl_soundstats_t;
+
 //
 // the client_static_t structure is persistent through an arbitrary number
 // of server connections
@@ -526,6 +539,9 @@ typedef struct client_static_s
        // LordHavoc: pausedemo
        qboolean demopaused;
 
+       // sound mixer statistics for showsound display
+       cl_soundstats_t soundstats;
+
        qboolean connect_trying;
        int connect_remainingtries;
        double connect_nextsendtime;
@@ -783,18 +799,9 @@ typedef struct client_state_s
        qboolean movement_predicted;
        // if true the CL_ClientMovement_Replay function will update origin, etc
        qboolean movement_replay;
-       // this is set true by svc_time parsing and causes a new movement to be
-       // queued for prediction purposes
-       qboolean movement_needupdate;
-       // timestamps of latest two predicted moves for interpolation
-       double movement_time[4];
        // simulated data (this is valid even if cl.movement is false)
        vec3_t movement_origin;
-       vec3_t movement_oldorigin;
        vec3_t movement_velocity;
-       // queue of proposed moves
-       int movement_numqueue;
-       client_movementqueue_t movement_queue[256];
        // whether the replay should allow a jump at the first sequence
        qboolean movement_replay_canjump;
 
@@ -1004,7 +1011,6 @@ typedef struct client_state_s
        float movevars_wallfriction;
        float movevars_waterfriction;
        float movevars_friction;
-       float movevars_packetinterval; // in game time (cl.time), not realtime
        float movevars_timescale;
        float movevars_gravity;
        float movevars_stopspeed;