]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_light.c
this should fix the program name in com_argv[0], so detection of which game to run...
[xonotic/darkplaces.git] / cl_light.c
index be8ab869cfbfd6bdf679c99e231e18253df778cf..5d0bcec682acbdee66064ffcc1d9f3521ca7cc5b 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;
@@ -33,14 +34,17 @@ void CL_AllocDlight (entity_render_t *ent, vec3_t org, float radius, float red,
 
 dlightsetup:
        memset (dl, 0, sizeof(*dl));
-       dl->ent = ent;
+       //dl->ent = ent;
        VectorCopy(org, dl->origin);
        dl->radius = radius;
        dl->color[0] = red;
        dl->color[1] = green;
        dl->color[2] = blue;
        dl->decay = decay;
-       dl->die = cl.time + lifetime;
+       if (lifetime)
+               dl->die = cl.time + lifetime;
+       else
+               dl->die = 0;
 }
 
 
@@ -75,4 +79,3 @@ void CL_DecayLights (void)
        }
 }
 
-