- Fixed: Decals would not use the shading colormap anymore.

SVN r1958 (trunk)
This commit is contained in:
Randy Heit 2009-11-02 01:02:23 +00:00
parent adbc9771b7
commit 358b2421ad

View file

@ -2434,11 +2434,13 @@ static void R_RenderDecal (side_t *wall, DBaseDecal *decal, drawseg_t *clipper,
// Prepare lighting
calclighting = false;
usecolormap = basecolormap;
bool rereadcolormap = true;
// Decals that are added to the scene must fade to black.
if (decal->RenderStyle == LegacyRenderStyles[STYLE_Add] && usecolormap->Fade != 0)
{
usecolormap = GetSpecialLights(usecolormap->Color, 0, usecolormap->Desaturate);
rereadcolormap = false;
}
rw_light = rw_lightleft + (x1 - WallSX1) * rw_lightstep;
@ -2473,6 +2475,12 @@ static void R_RenderDecal (side_t *wall, DBaseDecal *decal, drawseg_t *clipper,
mode = R_SetPatchStyle (decal->RenderStyle, decal->Alpha, decal->Translation, decal->AlphaColor);
// R_SetPatchStyle can modify basecolormap.
if (rereadcolormap)
{
usecolormap = basecolormap;
}
if (mode == DontDraw)
{
needrepeat = 0;