From: havoc Date: Thu, 8 Mar 2007 23:39:14 +0000 (+0000) Subject: fixed bug in portal culling code that allowed a leaf to be revisited multiple times... X-Git-Tag: xonotic-v0.1.0preview~3472 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f707812826e0794fa7737bb5596a29bebf649026;p=xonotic%2Fdarkplaces.git fixed bug in portal culling code that allowed a leaf to be revisited multiple times, causing it to be counted multiple times, and wasting a small amount of time marking surfaces redundantly git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6944 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rsurf.c b/gl_rsurf.c index 3c8302ec..d8e16f95 100644 --- a/gl_rsurf.c +++ b/gl_rsurf.c @@ -472,8 +472,10 @@ void R_View_WorldVisibility(void) leafstackpos = 1; while (leafstackpos) { - r_refdef.stats.world_leafs++; leaf = leafstack[--leafstackpos]; + if (r_viewcache.world_leafvisible[leaf - model->brush.data_leafs]) + continue; + r_refdef.stats.world_leafs++; r_viewcache.world_leafvisible[leaf - model->brush.data_leafs] = true; // mark any surfaces bounding this leaf if (leaf->numleafsurfaces)