From 06300d2599046a8484430131455780e71b4dc41a Mon Sep 17 00:00:00 2001 From: havoc Date: Tue, 16 Apr 2013 03:16:17 +0000 Subject: [PATCH] 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 --- gl_rmain.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.39.2