From: Christopher Bock Date: Thu, 10 Mar 2016 07:33:31 +0000 (+0100) Subject: * fixed C90 warnings X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b9b5f8d1409fab5d3f1a910c60b796e8c6e3263f;p=xonotic%2Fdarkplaces.git * fixed C90 warnings --- diff --git a/gl_rmain.c b/gl_rmain.c index b9b4e60b..35860d4f 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -6074,6 +6074,7 @@ static void R_Water_ProcessPlanes(int fbo, rtexture_t *depthtexture, rtexture_t vec3_t visorigin; qboolean usewaterfbo = (r_viewfbo.integer >= 1 || r_water_fbo.integer >= 1) && vid.support.ext_framebuffer_object && vid.support.arb_texture_non_power_of_two && vid.samples < 2; char vabuf[1024]; + float dotProduct, normalLength, planeDist; originalview = r_refdef.view; @@ -6179,9 +6180,9 @@ static void R_Water_ProcessPlanes(int fbo, rtexture_t *depthtexture, rtexture_t Matrix4x4_OriginFromMatrix(&r_refdef.view.matrix, r_refdef.view.origin); r_refdef.view.clipplane = p->plane; - float dotProduct = DotProduct(p->plane.normal, r_refdef.view.origin); - float normalLength = VectorLength(p->plane.normal); - float planeDist = dotProduct/normalLength - p->plane.dist; + dotProduct = DotProduct(p->plane.normal, r_refdef.view.origin); + normalLength = VectorLength(p->plane.normal); + planeDist = dotProduct/normalLength - p->plane.dist; if(planeDist > 100) r_refdef.view.clipplane.dist += 100.0; else if(planeDist < -100) @@ -6235,9 +6236,9 @@ static void R_Water_ProcessPlanes(int fbo, rtexture_t *depthtexture, rtexture_t r_refdef.view.clipplane = p->plane; VectorNegate(r_refdef.view.clipplane.normal, r_refdef.view.clipplane.normal); r_refdef.view.clipplane.dist = -r_refdef.view.clipplane.dist; - float dotProduct = DotProduct(p->plane.normal, r_refdef.view.origin); - float normalLength = VectorLength(p->plane.normal); - float planeDist = dotProduct/normalLength - p->plane.dist; + dotProduct = DotProduct(p->plane.normal, r_refdef.view.origin); + normalLength = VectorLength(p->plane.normal); + planeDist = dotProduct/normalLength - p->plane.dist; if(planeDist > 100) r_refdef.view.clipplane.dist -= 100.0; else if(planeDist < -100)