]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
gl_rmain: Disable water (and warpzones) when r_lockvisibility or r_lockpvs are 1
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 17 Jul 2020 13:59:34 +0000 (13:59 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 17 Jul 2020 13:59:34 +0000 (13:59 +0000)
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

index 9da488831432d5019ee610c31ab79b63d9c64da4..9773bdd3c46b0ab80b3171291c78ddf90f2a5f38 100644 (file)
@@ -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