]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_light.h
DP code cleanup, stage one - all headers that can be protected by ifdef
[xonotic/darkplaces.git] / cl_light.h
index 384306558e83019e05d3128300a2b1a06673b3ea..d717025d5da36b867573fbdc31041a569a75483b 100644 (file)
@@ -1,21 +1,33 @@
 
+#ifndef CL_LIGHT_H
+#define CL_LIGHT_H
+
 // LordHavoc: 256 dynamic lights
 #define        MAX_DLIGHTS             256
 typedef struct
 {
+       // location
        vec3_t  origin;
+       // stop lighting after this time
+       float   die;
+       // color of light
+       vec3_t  color;
+       // brightness (not really radius anymore)
        float   radius;
-       float   die;                    // stop lighting after this time
-       float   decay;                  // drop this each second
-       entity_render_t *ent;   // the entity that spawned this light (can be NULL if it will never be replaced)
-       vec3_t  color;                  // LordHavoc: colored lighting
-} dlight_t;
+       // drop this each second
+       float   decay;
+       // the entity that spawned this light (can be NULL if it will never be replaced)
+       entity_render_t *ent;
+}
+dlight_t;
 
 // LordHavoc: this affects the lighting scale of the whole game
-#define LIGHTOFFSET 4096.0f
+#define LIGHTOFFSET 1024.0f
 
-extern dlight_t                cl_dlights[MAX_DLIGHTS];
+extern dlight_t cl_dlights[MAX_DLIGHTS];
 
 extern void CL_AllocDlight (entity_render_t *ent, vec3_t org, float radius, float red, float green, float blue, float decay, float lifetime);
 extern void CL_DecayLights (void);
 
+#endif
+