]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rsurf.c
gl_rsurf: Don't cull geometry that leaves the view frustum with r_lockvisibility
[xonotic/darkplaces.git] / gl_rsurf.c
index 45eb0c4b0e69e21ec043b4bfafa0f49081b61a36..ddff6769587614b3d6da67ad2480347bee503eb7 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])
+               if (surfacevisible[surfaceindex] && !r_lockvisibility.integer)
                {
                        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)))