From bbcf30589038d06e78f9f3f4e4b7c1f748a3e374 Mon Sep 17 00:00:00 2001 From: lordhavoc Date: Mon, 15 Oct 2001 13:36:37 +0000 Subject: [PATCH] fix the off-by-one fix (oops) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@919 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rsurf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gl_rsurf.c b/gl_rsurf.c index 54f34cc3..78ebba52 100644 --- a/gl_rsurf.c +++ b/gl_rsurf.c @@ -1745,7 +1745,7 @@ void R_PVSWorldNode() r_portalframecount++; numleafs = model->numleafs; - numbits = numleafs - 1; + numbits = numleafs; k = 0; in = r_viewleaf->compressed_vis; row = (numbits + 7) >> 3; @@ -1762,7 +1762,7 @@ void R_PVSWorldNode() if (leafnum > numleafs) return; c -= bit; - leaf = &model->leafs[i]; + leaf = &model->leafs[leafnum]; if (R_NotCulledBox(leaf->mins, leaf->maxs)) { //for (portal = leaf->portals;portal;portal = portal->next) -- 2.39.2