From c52a75aea04a4d1aad32fc632d4584e6de131350 Mon Sep 17 00:00:00 2001 From: Spoike Date: Wed, 15 Jan 2014 02:13:06 +0000 Subject: [PATCH] try to fix a couple of rtlight issues. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4581 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/r_surf.c | 3 ++- engine/gl/gl_shadow.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/engine/client/r_surf.c b/engine/client/r_surf.c index 9605311ac..327a0de4f 100644 --- a/engine/client/r_surf.c +++ b/engine/client/r_surf.c @@ -1464,7 +1464,7 @@ start: { pleaf = (mleaf_t *)node; - c = pleaf - cl.worldmodel->leafs; + c = (pleaf - cl.worldmodel->leafs)-1; frustumvis[c>>3] |= 1<<(c&7); mark = pleaf->firstmarksurface; @@ -2347,6 +2347,7 @@ void Surf_DrawWorld (void) #ifdef TERRAIN if (currentmodel->type == mod_heightmap) { + frustumvis = NULL; entvis = surfvis = NULL; } else diff --git a/engine/gl/gl_shadow.c b/engine/gl/gl_shadow.c index 3956ade03..b6fe8c013 100644 --- a/engine/gl/gl_shadow.c +++ b/engine/gl/gl_shadow.c @@ -343,7 +343,7 @@ static void SHM_Shadow_Cache_Leaf(mleaf_t *leaf) { int i; - i = leaf - cl.worldmodel->leafs; + i = (leaf - cl.worldmodel->leafs)-1; sh_shmesh->litleaves[i>>3] |= 1<<(i&7); }