{
ent = r_refdef.entities[i];
r_viewcache.entityvisible[i] = !(ent->flags & renderimask) && !R_CullBox(ent->mins, ent->maxs) && ((ent->effects & EF_NODEPTHTEST) || r_refdef.worldmodel->brush.BoxTouchingVisibleLeafs(r_refdef.worldmodel, r_viewcache.world_leafvisible, ent->mins, ent->maxs));
+ if (r_viewcache.entityvisible[i])
+ R_UpdateEntityLighting(ent);
}
}
else
{
ent = r_refdef.entities[i];
r_viewcache.entityvisible[i] = !(ent->flags & renderimask) && !R_CullBox(ent->mins, ent->maxs);
+ if (r_viewcache.entityvisible[i])
+ R_UpdateEntityLighting(ent);
}
}
}
void R_UpdateVariables(void)
{
- int i;
-
R_Textures_Frame();
r_refdef.farclip = 4096;
}
else
r_refdef.fogenabled = false;
-
- // update some cached entity properties...
- for (i = 0;i < r_refdef.numentities;i++)
- {
- entity_render_t *ent = r_refdef.entities[i];
- R_UpdateEntityLighting(ent);
- }
}
/*