mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-12 23:54:17 +00:00
- Fixed: Decals would not use the shading colormap anymore.
SVN r1958 (trunk)
This commit is contained in:
parent
adbc9771b7
commit
358b2421ad
1 changed files with 8 additions and 0 deletions
|
@ -2434,11 +2434,13 @@ static void R_RenderDecal (side_t *wall, DBaseDecal *decal, drawseg_t *clipper,
|
||||||
// Prepare lighting
|
// Prepare lighting
|
||||||
calclighting = false;
|
calclighting = false;
|
||||||
usecolormap = basecolormap;
|
usecolormap = basecolormap;
|
||||||
|
bool rereadcolormap = true;
|
||||||
|
|
||||||
// Decals that are added to the scene must fade to black.
|
// Decals that are added to the scene must fade to black.
|
||||||
if (decal->RenderStyle == LegacyRenderStyles[STYLE_Add] && usecolormap->Fade != 0)
|
if (decal->RenderStyle == LegacyRenderStyles[STYLE_Add] && usecolormap->Fade != 0)
|
||||||
{
|
{
|
||||||
usecolormap = GetSpecialLights(usecolormap->Color, 0, usecolormap->Desaturate);
|
usecolormap = GetSpecialLights(usecolormap->Color, 0, usecolormap->Desaturate);
|
||||||
|
rereadcolormap = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
rw_light = rw_lightleft + (x1 - WallSX1) * rw_lightstep;
|
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);
|
mode = R_SetPatchStyle (decal->RenderStyle, decal->Alpha, decal->Translation, decal->AlphaColor);
|
||||||
|
|
||||||
|
// R_SetPatchStyle can modify basecolormap.
|
||||||
|
if (rereadcolormap)
|
||||||
|
{
|
||||||
|
usecolormap = basecolormap;
|
||||||
|
}
|
||||||
|
|
||||||
if (mode == DontDraw)
|
if (mode == DontDraw)
|
||||||
{
|
{
|
||||||
needrepeat = 0;
|
needrepeat = 0;
|
||||||
|
|
Loading…
Reference in a new issue