]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - client.h
you can now (try to) play in maps you don't have, and models you don't have are shown...
[xonotic/darkplaces.git] / client.h
index 2457c2f95e3bbd529820781cfba51d8ab6ba4a8f..cdd525566aef9c984bd353fe5f7257443c58d628 100644 (file)
--- a/client.h
+++ b/client.h
@@ -22,6 +22,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #ifndef CLIENT_H
 #define CLIENT_H
 
+#include "matrixlib.h"
+
 // LordHavoc: 256 dynamic lights
 #define MAX_DLIGHTS 256
 // LordHavoc: this affects the lighting scale of the whole game
@@ -92,6 +94,10 @@ typedef struct entity_render_s
        vec3_t origin;
        // orientation
        vec3_t angles;
+       // transform matrix for model to world
+       matrix4x4_t matrix;
+       // transform matrix for world to model
+       matrix4x4_t inversematrix;
        // opacity (alpha) of the model
        float alpha;
        // size the model is shown
@@ -135,6 +141,7 @@ typedef struct entity_render_s
        // caching results of static light traces (this is semi-persistent)
        double entlightstime;
        vec3_t entlightsorigin;
+       int entlightsframe;
        int numentlights;
        unsigned short entlights[MAXENTLIGHTS];
 }
@@ -153,6 +160,18 @@ typedef struct entity_persistent_s
        // 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];
+
        // interpolated animation
 
        // lerp resets when model changes
@@ -384,7 +403,12 @@ typedef struct
        char levelname[40];
        // cl_entitites[cl.viewentity] = player
        int viewentity;
+       // the real player entity (normally same as viewentity,
+       // different than viewentity if mod uses chasecam or other tricks)
+       int playerentity;
+       // max players that can be in this game
        int maxclients;
+       // type of game (deathmatch, coop, singleplayer)
        int gametype;
 
 // refresh related state
@@ -459,13 +483,14 @@ extern cvar_t r_draweffects;
 extern cvar_t cl_explosions;
 extern cvar_t cl_stainmaps;
 
-// these are updated by
+// these are updated by CL_ClearState
 extern int cl_num_entities;
 extern int cl_num_static_entities;
 extern int cl_num_temp_entities;
 extern int cl_num_brushmodel_entities;
 
 extern entity_t *cl_entities;
+extern qbyte *cl_entities_active;
 extern entity_t *cl_static_entities;
 extern entity_t *cl_temp_entities;
 extern entity_render_t **cl_brushmodel_entities;
@@ -493,6 +518,8 @@ void CL_EstablishConnection (char *host);
 void CL_Disconnect (void);
 void CL_Disconnect_f (void);
 
+void CL_BoundingBoxForEntity(entity_render_t *ent);
+
 //
 // cl_input
 //