]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - client.h
Added the togglemenu command for both menus and the chr builtin command (menu qc)
[xonotic/darkplaces.git] / client.h
index 681b3e6f620aa8d3d735a0bbaaefdec082c668ac..578cd68443b99772f5172e0fa75b4981d864706a 100644 (file)
--- a/client.h
+++ b/client.h
@@ -94,8 +94,8 @@ typedef struct frameblend_s
 }
 frameblend_t;
 
-// LordHavoc: disregard the following warning, entlights stuff is semi-persistent...
-// LordHavoc: nothing in this structure is persistent, it may be overwritten by the client every frame, for persistent data use entity_lerp_t.
+// LordHavoc: this struct is intended for the renderer but some fields are
+// used by the client.
 typedef struct entity_render_s
 {
        // location
@@ -124,14 +124,14 @@ typedef struct entity_render_s
        // render flags
        int flags;
 
-       // these are copied from the persistent data
+       // interpolated animation
 
        // frame that the model is interpolating from
        int frame1;
        // frame that the model is interpolating to
        int frame2;
        // interpolation factor, usually computed from frame2time
-       double framelerp;
+       float framelerp;
        // time frame1 began playing (for framegroup animations)
        double frame1time;
        // time frame2 began playing (for framegroup animations)
@@ -157,13 +157,12 @@ entity_render_t;
 
 typedef struct entity_persistent_s
 {
-       // particles
+       int linkframe;
 
-       // trail rendering
        vec3_t trail_origin;
-       float trail_time;
 
-       // effects
+       // particle trail
+       float trail_time;
 
        // muzzleflash fading
        float muzzleflash;
@@ -179,21 +178,6 @@ typedef struct entity_persistent_s
        float oldangles[3];
        float neworigin[3];
        float newangles[3];
-
-       // interpolated animation
-
-       // lerp resets when model changes
-       int modelindex;
-       // frame that the model is interpolating from
-       int frame1;
-       // frame that the model is interpolating to
-       int frame2;
-       // interpolation factor, usually computed from frame2time
-       double framelerp;
-       // time frame1 began playing (for framegroup animations)
-       double frame1time;
-       // time frame2 began playing (for framegroup animations)
-       double frame2time;
 }
 entity_persistent_t;
 
@@ -247,7 +231,8 @@ typedef struct
 #define        CSHIFT_DAMAGE   1
 #define        CSHIFT_BONUS    2
 #define        CSHIFT_POWERUP  3
-#define        NUM_CSHIFTS             4
+#define        CSHIFT_VCSHIFT  4
+#define        NUM_CSHIFTS             5
 
 #define        NAME_LENGTH     64
 
@@ -324,6 +309,9 @@ extern client_static_t      cls;
 //
 typedef struct
 {
+       // true if playing in a local game and no one else is connected
+       int islocalgame;
+
        // when connecting to the server throw out the first couple move messages
        // so the player doesn't accidentally do something the first frame
        int movemessages;
@@ -341,6 +329,8 @@ typedef struct
        int items;
        // cl.time of acquiring item, for blinking
        float item_gettime[32];
+       // cl.time of changing STAT_ACTIVEWEAPON
+       float weapontime;
        // use pain anim frame if cl.time < this
        float faceanimtime;
 
@@ -438,8 +428,12 @@ typedef struct
        // for interpolation
        float viewzoomold, viewzoomnew;
 
+       // protocol version of the server we're connected to
+       int protocol;
+
        // entity database stuff
        entity_database_t entitydatabase;
+       entity_database4_t *entitydatabase4;
 }
 client_state_t;
 
@@ -523,6 +517,10 @@ void CL_Disconnect_f (void);
 
 void CL_BoundingBoxForEntity(entity_render_t *ent);
 
+extern cvar_t cl_beams_polygons;
+extern cvar_t cl_beams_relative;
+extern cvar_t cl_beams_lightatend;
+
 //
 // cl_input
 //
@@ -538,7 +536,7 @@ extern      kbutton_t       in_strafe;
 extern         kbutton_t       in_speed;
 
 void CL_InitInput (void);
-void CL_SendCmd (void);
+void CL_SendCmd (usercmd_t *cmd);
 void CL_SendMove (usercmd_t *cmd);
 
 void CL_LerpUpdate(entity_t *e);
@@ -639,9 +637,8 @@ typedef struct
        int x, y, width, height;
        float fov_x, fov_y;
 
-       // view point
-       vec3_t vieworg;
-       vec3_t viewangles;
+       // view transform
+       matrix4x4_t viewentitymatrix;
 
        // fullscreen color blend
        float viewblend[4];