From: divverent Date: Sun, 7 Dec 2008 11:51:23 +0000 (+0000) Subject: fix showsurfaces 3 bugs on augenkrebs X-Git-Tag: xonotic-v0.1.0preview~2013 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bc7a1ad5e8d89168a23166038ea2c5e3c5fb9604;p=xonotic%2Fdarkplaces.git fix showsurfaces 3 bugs on augenkrebs git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8577 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rmain.c b/gl_rmain.c index 95ac160d..8de08afd 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -6510,18 +6510,18 @@ static void R_DrawTextureSurfaceList_ShowSurfaces3(int texturenumsurfaces, msurf c[3] = 1; } - // brighten it up (as texture value 127 means "unlit") - c[0] *= 2; - c[1] *= 2; - c[2] *= 2; - if (rsurface.texture->currentskinframe->pants || rsurface.texture->currentskinframe->shirt) { - c[0] = rsurface.colormap_pantscolor[0] * 0.3 + rsurface.colormap_shirtcolor[0] * 0.7; - c[1] = rsurface.colormap_pantscolor[1] * 0.3 + rsurface.colormap_shirtcolor[1] * 0.7; - c[2] = rsurface.colormap_pantscolor[2] * 0.3 + rsurface.colormap_shirtcolor[2] * 0.7; + c[0] = rsurface.colormap_pantscolor[0] * 0.2 + rsurface.colormap_shirtcolor[0] * 0.3; + c[1] = rsurface.colormap_pantscolor[1] * 0.2 + rsurface.colormap_shirtcolor[1] * 0.3; + c[2] = rsurface.colormap_pantscolor[2] * 0.2 + rsurface.colormap_shirtcolor[2] * 0.3; } + // brighten it up (as texture value 127 means "unlit") + c[0] *= 2 * r_refdef.view.colorscale; + c[1] *= 2 * r_refdef.view.colorscale; + c[2] *= 2 * r_refdef.view.colorscale; + if(rsurface.texture->currentmaterialflags & MATERIALFLAG_WATERALPHA) c[3] *= r_wateralpha.value; @@ -6555,9 +6555,6 @@ static void R_DrawTextureSurfaceList_ShowSurfaces3(int texturenumsurfaces, msurf rsurface.lightmapcolor4f_bufferobject = rsurface.modellightmapcolor4f_bufferobject; rsurface.lightmapcolor4f_bufferoffset = rsurface.modellightmapcolor4f_bufferoffset; - if(!rsurface.lightmapcolor4f) - RSurf_DrawBatch_GL11_MakeFullbrightLightmapColorArray(texturenumsurfaces, texturesurfacelist); - if (rsurface.texture->currentmaterialflags & MATERIALFLAG_MODELLIGHT) { qboolean applycolor = true; @@ -6571,6 +6568,9 @@ static void R_DrawTextureSurfaceList_ShowSurfaces3(int texturenumsurfaces, msurf else RSurf_PrepareVerticesForBatch(false, false, texturenumsurfaces, texturesurfacelist); + if(!rsurface.lightmapcolor4f) + RSurf_DrawBatch_GL11_MakeFullbrightLightmapColorArray(texturenumsurfaces, texturesurfacelist); + RSurf_DrawBatch_GL11_ApplyAmbient(texturenumsurfaces, texturesurfacelist); RSurf_DrawBatch_GL11_ApplyColor(texturenumsurfaces, texturesurfacelist, c[0], c[1], c[2], c[3]); if(r_refdef.fogenabled)