From: divverent Date: Sat, 6 Dec 2008 21:08:15 +0000 (+0000) Subject: undo the last fix, and instead make a new fix that does not make dark stuff bright. X-Git-Tag: xonotic-v0.1.0preview~2018 X-Git-Url: http://de.git.xonotic.org/?a=commitdiff_plain;h=81c4496fdd4c2bdd0d0c89fc028cb79d600a7447;p=xonotic%2Fdarkplaces.git undo the last fix, and instead make a new fix that does not make dark stuff bright. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8572 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rmain.c b/gl_rmain.c index 4bdefc83..5475734c 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -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);