10 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++)
26 // then look for anything else
28 for (i = 0;i < MAX_DLIGHTS;i++, dl++)
36 //Con_Printf("dlight %i : %f %f %f : %f %f %f\n", i, org[0], org[1], org[2], red * radius, green * radius, blue * radius);
37 memset (dl, 0, sizeof(*dl));
39 VectorCopy(org, dl->origin);
46 dl->die = cl.time + lifetime;
58 void CL_DecayLights (void)
64 time = cl.time - cl.oldtime;
67 for (i=0 ; i<MAX_DLIGHTS ; i++, dl++)
71 if (dl->die < cl.time)
77 dl->radius -= time*dl->decay;