]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
undo the last fix, and instead make a new fix that does not make dark stuff bright.
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 6 Dec 2008 21:08:15 +0000 (21:08 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 6 Dec 2008 21:08:15 +0000 (21:08 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8572 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index 4bdefc831534a406c4ec586b6c51977190e8216f..5475734c9b4add1db210555db3fc42c14dbc27cc 100644 (file)
@@ -5974,7 +5974,7 @@ static void RSurf_DrawBatch_GL11_VertexShade(int texturenumsurfaces, msurface_t
        diffusecolor[0] = rsurface.modellight_diffuse[0] * r * f;
        diffusecolor[1] = rsurface.modellight_diffuse[1] * g * f;
        diffusecolor[2] = rsurface.modellight_diffuse[2] * b * f;
-       if (VectorLength2(diffusecolor) > 0)
+       if (VectorLength2(diffusecolor) > 0 && rsurface.normal3f)
        {
                // generate color arrays for the surfaces in this list
                for (texturesurfaceindex = 0;texturesurfaceindex < texturenumsurfaces;texturesurfaceindex++)
@@ -6582,7 +6582,7 @@ static void R_ProcessTextureSurfaceList(int texturenumsurfaces, msurface_t **tex
                        RSurf_DrawBatch_GL11_ApplyAmbient(texturenumsurfaces, texturesurfacelist);
                        RSurf_DrawBatch_GL11_ApplyColor(texturenumsurfaces, texturesurfacelist, c[0], c[1], c[2], c[3]);
 
-                       if ((rsurface.texture->currentmaterialflags & MATERIALFLAG_MODELLIGHT) && rsurface.normal3f)
+                       if (rsurface.texture->currentmaterialflags & MATERIALFLAG_MODELLIGHT)
                        {
                                r_refdef.lightmapintensity = 1;
                                RSurf_DrawBatch_GL11_VertexShade(texturenumsurfaces, texturesurfacelist, c[0], c[1], c[2], c[3], false, false);