- Fixed: Sprites and decals that are drawn with addition must fade to black.

SVN r1952 (trunk)
This commit is contained in:
Randy Heit 2009-10-30 03:46:51 +00:00
parent 321ab2f686
commit 4252cd52ad
3 changed files with 19 additions and 7 deletions

View file

@ -1,8 +1,7 @@
October 29, 2009
- Fixed: Sprites and decals that are drawn with addition must fade to black.
- Make TranslateToStartSpot() set the new sector references for a polyobj's
walls so that P_CheckSwitchRange() will work with them.
- Fixed: If P_ActivateLine() failed in P_UseTraverse() it would not play
the *usefail sound.
- Fixed: An unspecified save_dir will now save to the program directory on
Windows. (Other operating systems already use the user's home directory
instead.)

View file

@ -2432,14 +2432,21 @@ static void R_RenderDecal (side_t *wall, DBaseDecal *decal, drawseg_t *clipper,
// Prepare lighting
calclighting = false;
FDynamicColormap *usecolormap = basecolormap;
// Decals that are added to the scene must fade to black.
if (decal->RenderStyle.BlendOp == STYLEOP_Add && usecolormap->Fade != 0)
{
usecolormap = GetSpecialLights(usecolormap->Color, 0, usecolormap->Desaturate);
}
rw_light = rw_lightleft + (x1 - WallSX1) * rw_lightstep;
if (fixedlightlev >= 0)
dc_colormap = basecolormap->Maps + fixedlightlev;
dc_colormap = usecolormap->Maps + fixedlightlev;
else if (fixedcolormap != NULL)
dc_colormap = fixedcolormap;
else if (!foggy && (decal->RenderFlags & RF_FULLBRIGHT))
dc_colormap = basecolormap->Maps;
dc_colormap = usecolormap->Maps;
else
calclighting = true;
@ -2486,7 +2493,7 @@ static void R_RenderDecal (side_t *wall, DBaseDecal *decal, drawseg_t *clipper,
{
if (calclighting)
{ // calculate lighting
dc_colormap = basecolormap->Maps + (GETPALOOKUP (rw_light, wallshade) << COLORMAPSHIFT);
dc_colormap = usecolormap->Maps + (GETPALOOKUP (rw_light, wallshade) << COLORMAPSHIFT);
}
WallSpriteColumn (R_DrawMaskedColumn);
@ -2497,7 +2504,7 @@ static void R_RenderDecal (side_t *wall, DBaseDecal *decal, drawseg_t *clipper,
{
if (calclighting)
{ // calculate lighting
dc_colormap = basecolormap->Maps + (GETPALOOKUP (rw_light, wallshade) << COLORMAPSHIFT);
dc_colormap = usecolormap->Maps + (GETPALOOKUP (rw_light, wallshade) << COLORMAPSHIFT);
}
rt_initcols();
for (int zz = 4; zz; --zz)
@ -2512,7 +2519,7 @@ static void R_RenderDecal (side_t *wall, DBaseDecal *decal, drawseg_t *clipper,
{
if (calclighting)
{ // calculate lighting
dc_colormap = basecolormap->Maps + (GETPALOOKUP (rw_light, wallshade) << COLORMAPSHIFT);
dc_colormap = usecolormap->Maps + (GETPALOOKUP (rw_light, wallshade) << COLORMAPSHIFT);
}
WallSpriteColumn (R_DrawMaskedColumn);

View file

@ -1432,6 +1432,12 @@ void R_ProjectSprite (AActor *thing, int fakeside)
FDynamicColormap *mybasecolormap = basecolormap;
// Sprites that are added to the scene must fade to black.
if (vis->RenderStyle.BlendOp == STYLEOP_Add && mybasecolormap->Fade != 0)
{
mybasecolormap = GetSpecialLights(mybasecolormap->Color, 0, mybasecolormap->Desaturate);
}
if (vis->RenderStyle.Flags & STYLEF_FadeToBlack)
{
if (invertcolormap)