]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_light.c
check for -safe
[xonotic/darkplaces.git] / cl_light.c
index 68cb9e768d57d8d395106cfd31298f92cee445cd..9c5d291d4e26d43f87ef6e61283752d6cdd06bf7 100644 (file)
@@ -1,6 +1,5 @@
-#include "quakedef.h"
 
-dlight_t cl_dlights[MAX_DLIGHTS];
+#include "quakedef.h"
 
 /*
 ===============
@@ -13,6 +12,7 @@ void CL_AllocDlight (entity_render_t *ent, vec3_t org, float radius, float red,
        int             i;
        dlight_t        *dl;
 
+       /*
 // first look for an exact key match
        if (ent)
        {
@@ -21,6 +21,7 @@ void CL_AllocDlight (entity_render_t *ent, vec3_t org, float radius, float red,
                        if (dl->ent == ent)
                                goto dlightsetup;
        }
+       */
 
 // then look for anything else
        dl = cl_dlights;
@@ -32,8 +33,9 @@ void CL_AllocDlight (entity_render_t *ent, vec3_t org, float radius, float red,
        return;
 
 dlightsetup:
+       //Con_Printf("dlight %i : %f %f %f : %f %f %f\n", i, org[0], org[1], org[2], red * radius, green * radius, blue * radius);
        memset (dl, 0, sizeof(*dl));
-       dl->ent = ent;
+       //dl->ent = ent;
        VectorCopy(org, dl->origin);
        dl->radius = radius;
        dl->color[0] = red;
@@ -78,4 +80,3 @@ void CL_DecayLights (void)
        }
 }
 
-