]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix two very ambiguous for loops that calculate camerawidth and
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 16 Apr 2013 03:16:17 +0000 (03:16 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 16 Apr 2013 03:16:17 +0000 (03:16 +0000)
cameraheight

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11934 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index ffb11d702c8f86790cc5c89a5e70f0f4837dae2c..1ab7aaa2fa3451ac80d4e13b24b92d9fe21f9d81 100644 (file)
@@ -5784,10 +5784,10 @@ static void R_Water_StartFrame(void)
        }
        else
        {
-               for (texturewidth   = 1;texturewidth   < waterwidth ;texturewidth   *= 2);
-               for (textureheight  = 1;textureheight  < waterheight;textureheight  *= 2);
-               for (camerawidth    = 1;camerawidth   <= waterwidth; camerawidth    *= 2); camerawidth  /= 2;
-               for (cameraheight   = 1;cameraheight  <= waterheight;cameraheight   *= 2); cameraheight /= 2;
+               for (texturewidth   = 1;texturewidth     <  waterwidth ;texturewidth   *= 2);
+               for (textureheight  = 1;textureheight    <  waterheight;textureheight  *= 2);
+               for (camerawidth    = 1;camerawidth  * 2 <= waterwidth ;camerawidth    *= 2);
+               for (cameraheight   = 1;cameraheight * 2 <= waterheight;cameraheight   *= 2);
        }
 
        // allocate textures as needed