]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
gl_rsurf: Check r_lockvisibility only once
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 17 Jul 2020 05:50:50 +0000 (05:50 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 17 Jul 2020 05:50:50 +0000 (05:50 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12833 d7cf8633-e32d-0410-b094-e92efae38249

gl_rsurf.c

index ddff6769587614b3d6da67ad2480347bee503eb7..f7e070aabc23ce8e856b8861d31cd6f50b00c65a 100644 (file)
@@ -428,7 +428,7 @@ static void R_View_WorldVisibility_CullSurfaces(void)
        surfacevisible = r_refdef.viewcache.world_surfacevisible;
        for (surfaceindex = surfaceindexstart; surfaceindex < surfaceindexend; surfaceindex++)
        {
-               if (surfacevisible[surfaceindex] && !r_lockvisibility.integer)
+               if (surfacevisible[surfaceindex])
                {
                        if (R_CullBox(surfaces[surfaceindex].mins, surfaces[surfaceindex].maxs)
                         || (r_vis_trace_surfaces.integer && !R_CanSeeBox(r_vis_trace_samples.integer, r_vis_trace_eyejitter.value, r_vis_trace_enlarge.value, r_vis_trace_expand.value, r_vis_trace_pad.value, r_refdef.view.origin, surfaces[surfaceindex].mins, surfaces[surfaceindex].maxs)))
@@ -595,9 +595,8 @@ void R_View_WorldVisibility(qboolean forcenovis)
                                }
                        }
                }
+               R_View_WorldVisibility_CullSurfaces();  
        }
-
-       R_View_WorldVisibility_CullSurfaces();
 }
 
 void R_Mod_DrawSky(entity_render_t *ent)