From: havoc Date: Tue, 16 Apr 2013 03:16:17 +0000 (+0000) Subject: fix two very ambiguous for loops that calculate camerawidth and X-Git-Tag: xonotic-v0.7.0~18 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=cb29f2cb1d241bf446316b0f0653a580ab60b8bc;p=xonotic%2Fdarkplaces.git fix two very ambiguous for loops that calculate camerawidth and cameraheight git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11934 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=06300d2599046a8484430131455780e71b4dc41a --- diff --git a/gl_rmain.c b/gl_rmain.c index ffb11d70..1ab7aaa2 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -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