if (!sv.active)
Host_ClearMemory ();
+ // note: this also gets rid of the entity database
Mem_EmptyPool(cl_entities_mempool);
// wipe the entire cl structure
// LordHavoc: lerp in listen games as the server is being capped below the client (usually)
f = cl.mtime[0] - cl.mtime[1];
- if (!f || cl_nolerp.integer || cls.timedemo || (sv.active && svs.maxclients == 1))
+ if (!f || cl_nolerp.integer || cls.timedemo || cl.islocalgame)
{
cl.time = cl.mtime[0];
return 1;
float time;
time = cl.time - cl.oldtime;
-
- dl = cl_dlights;
- for (i=0 ; i<MAX_DLIGHTS ; i++, dl++)
- {
- if (!dl->radius)
- continue;
- if (dl->die < cl.time)
- {
- dl->radius = 0;
- continue;
- }
-
- dl->radius -= time*dl->decay;
- if (dl->radius < 0)
- dl->radius = 0;
- }
+ for (i = 0, dl = cl_dlights;i < MAX_DLIGHTS;i++, dl++)
+ if (dl->radius)
+ dl->radius = (cl.time < dl->die) ? max(0, dl->radius - time * dl->decay) : 0;
}
extern qboolean Nehahrademcompatibility;
if (e->render.model)
{
Mod_CheckLoaded(e->render.model);
- if (e->render.model->type != mod_brush)
+ if (e->render.model->type == mod_alias || e->render.model->type == mod_sprite)
angles[0] = -angles[0];
if (e->render.model->flags & EF_ROTATE)
{
// as soon as player is known we can call V_CalcRefDef
if ((e - cl_entities) == cl.viewentity)
V_CalcRefdef();
- if (e->render.model && e->render.model->name[0] == '*' && e->render.model->type == mod_brush)
+ if (e->render.model && e->render.model->name[0] == '*' && e->render.model->brush.TraceBox)
cl_brushmodel_entities[cl_num_brushmodel_entities++] = &e->render;
// don't show entities with no modelindex (note: this still shows
// entities which have a modelindex that resolved to a NULL model)