]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - client.h
win32 fixes and some MSVC warnings fixed
[xonotic/darkplaces.git] / client.h
index 4b7eab4587e2b56510e73d9c5b067ecb852ea54f..99a85af37c1736f5a39c3b3b2e79508735bbf9e2 100644 (file)
--- a/client.h
+++ b/client.h
@@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
 // client.h
 
+#ifndef CLIENT_H
+#define CLIENT_H
+
 typedef struct frameblend_s
 {
        int frame;
@@ -26,7 +29,10 @@ typedef struct frameblend_s
 }
 frameblend_t;
 
-// LordHavoc: nothing in this structure is persistant, it may be overwritten by the client every frame, for persistant data use entity_lerp_t.
+#define MAXENTLIGHTS 128
+
+// 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.
 typedef struct entity_render_s
 {
        // location
@@ -72,6 +78,12 @@ typedef struct entity_render_s
        vec3_t mins, maxs;
        // 4 frame numbers (-1 if not used) and their blending scalers (0-1), if interpolation is not desired, use frame instead
        frameblend_t frameblend[4];
+
+       // caching results of static light traces (this is semi-persistent)
+       double entlightstime;
+       vec3_t entlightsorigin;
+       int numentlights;
+       unsigned short entlights[MAXENTLIGHTS];
 }
 entity_render_t;
 
@@ -190,7 +202,7 @@ typedef enum
 cactive_t;
 
 //
-// the client_static_t structure is persistant through an arbitrary number
+// the client_static_t structure is persistent through an arbitrary number
 // of server connections
 //
 typedef struct
@@ -306,7 +318,6 @@ typedef struct
 
 // refresh related state
        struct model_s  *worldmodel;    // cl_entitites[0].model
-//     int                     num_entities;   // held in cl_entities array
        int                     num_statics;    // held in cl_staticentities array
        entity_t        viewent;                        // the gun model
 
@@ -474,22 +485,6 @@ void CL_InitTEnts (void);
 #define PARTICLE_UPRIGHT_FACING 2
 #define PARTICLE_ORIENTED_DOUBLESIDED 3
 
-/*
-typedef struct renderparticle_s
-{
-       int tex;
-       int orientation;
-       int additive;
-       int dynlight;
-       float scalex;
-       float scaley;
-       float org[3];
-       float dir[3];
-       float color[4];
-}
-renderparticle_t;
-*/
-
 void CL_Particles_Clear(void);
 void CL_Particles_Init(void);
 
@@ -539,9 +534,6 @@ typedef struct
        int numentities;
        entity_render_t **entities;
 
-       //int numparticles;
-       //struct renderparticle_s *particles;
-
        qbyte drawqueue[MAX_DRAWQUEUE];
        int drawqueuesize;
 }
@@ -552,3 +544,6 @@ refdef_t r_refdef;
 extern mempool_t *cl_refdef_mempool;
 
 #include "cgamevm.h"
+
+#endif
+