From 358b2421ad0191d88f1a38f9678dbe6ece776074 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Mon, 2 Nov 2009 01:02:23 +0000 Subject: [PATCH] - Fixed: Decals would not use the shading colormap anymore. SVN r1958 (trunk) --- src/r_segs.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/r_segs.cpp b/src/r_segs.cpp index 2a291277c..a31ca41dd 100644 --- a/src/r_segs.cpp +++ b/src/r_segs.cpp @@ -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;