- moved part of the fade init for LEVEL_HASFADETABLE to the common colormap initialization to have all of it in one place.

Otherwise this is easily overlooked when changing things later and potentially causing problems.
This commit is contained in:
Christoph Oelckers 2018-04-03 20:55:36 +02:00
commit 91813ec43d
3 changed files with 9 additions and 10 deletions

View file

@ -1502,6 +1502,8 @@ void P_LoadSectors (MapData *map, FMissingTextureTracker &missingtex)
ss->ZoneNumber = 0xFFFF;
ss->terrainnum[sector_t::ceiling] = ss->terrainnum[sector_t::floor] = -1;
// [RH] Sectors default to white light with the default fade.
// If they are outside (have a sky ceiling), they use the outside fog.
ss->Colormap.LightColor = PalEntry(255, 255, 255);
@ -1509,11 +1511,16 @@ void P_LoadSectors (MapData *map, FMissingTextureTracker &missingtex)
{
ss->Colormap.FadeColor.SetRGB(level.outsidefog);
}
else if (level.flags & LEVEL_HASFADETABLE)
{
ss->Colormap.FadeColor= 0x939393; // The true color software renderer needs this. (The hardware renderer will ignore this value if LEVEL_HASFADETABLE is set.)
}
else
{
ss->Colormap.FadeColor.SetRGB(level.fadeto);
}
// killough 8/28/98: initialize all sectors to normal friction
ss->friction = ORIG_FRICTION;
ss->movefactor = ORIG_FRICTION_FACTOR;
@ -4123,6 +4130,7 @@ void P_SetupLevel (const char *lumpname, int position)
// This must be done BEFORE the PolyObj Spawn!!!
InitRenderInfo();
Renderer->PreprocessLevel();
SWRenderer->PreprocessLevel();
InitPortalGroups();
times[16].Clock();