From 293cacfca46691fac639a5cea83b9adbb4d93066 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 16 Oct 2005 04:03:13 +0000 Subject: [PATCH] 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 --- engine/common/q1bsp.c | 2 +- engine/gl/gl_rlight.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/engine/common/q1bsp.c b/engine/common/q1bsp.c index 608f59714..308024c39 100644 --- a/engine/common/q1bsp.c +++ b/engine/common/q1bsp.c @@ -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 ; inumsurfaces ; i++, surf++) { if (surf->dlightframe != r_dlightframecount) diff --git a/engine/gl/gl_rlight.c b/engine/gl/gl_rlight.c index 20a745a83..a7ce0512e 100644 --- a/engine/gl/gl_rlight.c +++ b/engine/gl/gl_rlight.c @@ -383,13 +383,14 @@ void GLR_PushDlights (void) // if (!cl.worldmodel->nodes) // return; + currentmodel = cl.worldmodel; l = cl_dlights; for (i=0 ; iradius || l->nodynamic) continue; - cl.worldmodel->funcs.MarkLights( l, 1<nodes ); + currentmodel->funcs.MarkLights( l, 1<nodes ); } }