3 dlight_t cl_dlights[MAX_DLIGHTS];
11 void CL_AllocDlight (entity_render_t *ent, vec3_t org, float radius, float red, float green, float blue, float decay, float lifetime)
16 // first look for an exact key match
20 for (i = 0;i < MAX_DLIGHTS;i++, dl++)
25 // then look for anything else
27 for (i = 0;i < MAX_DLIGHTS;i++, dl++)
35 memset (dl, 0, sizeof(*dl));
37 VectorCopy(org, dl->origin);
44 dl->die = cl.time + lifetime;
56 void CL_DecayLights (void)
62 time = cl.time - cl.oldtime;
65 for (i=0 ; i<MAX_DLIGHTS ; i++, dl++)
69 if (dl->die < cl.time)
75 dl->radius -= time*dl->decay;