]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
slight cleanup (complete removal) of the "base" variable in surface rendering
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 20 May 2005 06:04:36 +0000 (06:04 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 20 May 2005 06:04:36 +0000 (06:04 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5316 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index b5b3859f24dd98e1a9368a2d1ef3b1980e1f78d5..d7ab02c30a9750e7c59cbaec53664d39010f3896 100644 (file)
@@ -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++)