From: cloudwalk Date: Fri, 17 Jul 2020 13:59:34 +0000 (+0000) Subject: gl_rmain: Disable water (and warpzones) when r_lockvisibility or r_lockpvs are 1 X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=2938f363423bff2eceb2d4be221a7c12487586dc;p=xonotic%2Fdarkplaces.git 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 --- 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