From 2938f363423bff2eceb2d4be221a7c12487586dc Mon Sep 17 00:00:00 2001 From: cloudwalk Date: Fri, 17 Jul 2020 13:59:34 +0000 Subject: [PATCH] gl_rmain: Disable water (and warpzones) when r_lockvisibility or r_lockpvs are 1 Fixes an issue where it would render the reflection of water, or the opposite side of the warpzone, instead of where the actual frustum is. There's probably a better solution but this should be fine for now. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12835 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gl_rmain.c b/gl_rmain.c index 9da48883..9773bdd3 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -4732,7 +4732,7 @@ static void R_Water_StartFrame(int viewwidth, int viewheight) waterwidth = (int)bound(16, viewwidth * r_water_resolutionmultiplier.value, viewwidth); waterheight = (int)bound(16, viewheight * r_water_resolutionmultiplier.value, viewheight); - if (!r_water.integer || r_showsurfaces.integer) + if (!r_water.integer || r_showsurfaces.integer || r_lockvisibility.integer || r_lockpvs.integer) waterwidth = waterheight = 0; // set up variables that will be used in shader setup -- 2.39.2