4 dlight_t cl_dlights[MAX_DLIGHTS];
12 void CL_AllocDlight (entity_render_t *ent, vec3_t org, float radius, float red, float green, float blue, float decay, float lifetime)
17 // first look for an exact key match
21 for (i = 0;i < MAX_DLIGHTS;i++, dl++)
26 // then look for anything else
28 for (i = 0;i < MAX_DLIGHTS;i++, dl++)
36 memset (dl, 0, sizeof(*dl));
38 VectorCopy(org, dl->origin);
45 dl->die = cl.time + lifetime;
57 void CL_DecayLights (void)
63 time = cl.time - cl.oldtime;
66 for (i=0 ; i<MAX_DLIGHTS ; i++, dl++)
70 if (dl->die < cl.time)
76 dl->radius -= time*dl->decay;