From: cloudwalk Date: Fri, 17 Jul 2020 05:50:50 +0000 (+0000) Subject: gl_rsurf: Check r_lockvisibility only once X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6182d4373243d6e4b7117b286ccc541693e8a73d;p=xonotic%2Fdarkplaces.git gl_rsurf: Check r_lockvisibility only once git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12833 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rsurf.c b/gl_rsurf.c index ddff6769..f7e070aa 100644 --- a/gl_rsurf.c +++ b/gl_rsurf.c @@ -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)