From: havoc Date: Fri, 20 May 2005 06:04:36 +0000 (+0000) Subject: slight cleanup (complete removal) of the "base" variable in surface rendering X-Git-Tag: xonotic-v0.1.0preview~4865 X-Git-Url: http://de.git.xonotic.org/?a=commitdiff_plain;h=9ecc99ca278a554200d69afe32beaa42b90f1c2e;p=xonotic%2Fdarkplaces.git slight cleanup (complete removal) of the "base" variable in surface rendering git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5316 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rmain.c b/gl_rmain.c index b5b3859f..d7ab02c3 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -1712,7 +1712,7 @@ static void R_DrawTextureSurfaceList(const entity_render_t *ent, texture_t *text float *c; float diff[3]; float colorpants[3], colorshirt[3]; - float f, r, g, b, a, base, colorscale; + float f, r, g, b, a, colorscale; const msurface_t *surface; qboolean dolightmap; qboolean doambient; @@ -1902,7 +1902,6 @@ static void R_DrawTextureSurfaceList(const entity_render_t *ent, texture_t *text g = ent->colormod[1] * colorscale; b = ent->colormod[2] * colorscale; a = texture->currentalpha; - base = r_ambient.value * (1.0f / 64.0f); // q3bsp has no lightmap updates, so the lightstylevalue that // would normally be baked into the lightmaptexture must be // applied to the color @@ -2174,10 +2173,10 @@ static void R_DrawTextureSurfaceList(const entity_render_t *ent, texture_t *text colorscale *= 0.5f; } R_Mesh_State(&m); - base = r_ambient.value * (1.0f / 64.0f); - r = ent->colormod[0] * colorscale * base; - g = ent->colormod[1] * colorscale * base; - b = ent->colormod[2] * colorscale * base; + colorscale *= r_ambient.value * (1.0f / 64.0f); + r = ent->colormod[0] * colorscale; + g = ent->colormod[1] * colorscale; + b = ent->colormod[2] * colorscale; a = texture->currentalpha; applycolor = r != 1 || g != 1 || b != 1 || a != 1; for (texturesurfaceindex = 0;texturesurfaceindex < texturenumsurfaces;texturesurfaceindex++)