Fixed an assumption where all lit q1bsp models are cl.worldmodel - we use currentmodel instead.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1491 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-10-16 04:03:13 +00:00
parent a5d7e99940
commit 293cacfca4
2 changed files with 3 additions and 2 deletions

View File

@ -311,7 +311,7 @@ void Q1BSP_MarkLights (dlight_t *light, int bit, mnode_t *node)
}
// mark the polygons
surf = cl.worldmodel->surfaces + node->firstsurface;
surf = currentmodel->surfaces + node->firstsurface;
for (i=0 ; i<node->numsurfaces ; i++, surf++)
{
if (surf->dlightframe != r_dlightframecount)

View File

@ -383,13 +383,14 @@ void GLR_PushDlights (void)
// if (!cl.worldmodel->nodes)
// return;
currentmodel = cl.worldmodel;
l = cl_dlights;
for (i=0 ; i<MAX_SWLIGHTS ; i++, l++)
{
if (!l->radius || l->nodynamic)
continue;
cl.worldmodel->funcs.MarkLights( l, 1<<i, cl.worldmodel->nodes );
currentmodel->funcs.MarkLights( l, 1<<i, currentmodel->nodes );
}
}