]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fixed bug in portal culling code that allowed a leaf to be revisited multiple times...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 8 Mar 2007 23:39:14 +0000 (23:39 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 8 Mar 2007 23:39:14 +0000 (23:39 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6944 d7cf8633-e32d-0410-b094-e92efae38249

gl_rsurf.c

index 3c8302ec08eae5ea980de3128cccff405b3eb94e..d8e16f95364fe8be3d7c70606c6261b1df65c78d 100644 (file)
@@ -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)