- fixed: Identification of Doom1 Freedoom IWAD did not work.

- fixed: UDMF did not initialize a sector's light colors.
- fixed implementation of DF2_NOAUTOAIM flag.


SVN r1356 (trunk)
This commit is contained in:
Christoph Oelckers 2009-01-10 09:40:47 +00:00
commit b4b76ed4e6
11 changed files with 57 additions and 70 deletions

View file

@ -950,19 +950,36 @@ struct UDMFParser
sec->ceilingplane.c = -FRACUNIT;
sec->ceilingplane.ic = -FRACUNIT;
// [RH] Sectors default to white light with the default fade.
// If they are outside (have a sky ceiling), they use the outside fog.
if (level.outsidefog != 0xff000000 && (sec->GetTexture(sector_t::ceiling) == skyflatnum || (sec->special&0xff) == Sector_Outside))
if (lightcolor == -1 && fadecolor == -1 && desaturation == -1)
{
if (fogMap == NULL)
fogMap = GetSpecialLights (PalEntry (255,255,255), level.outsidefog, 0);
sec->ColorMap = fogMap;
// [RH] Sectors default to white light with the default fade.
// If they are outside (have a sky ceiling), they use the outside fog.
if (level.outsidefog != 0xff000000 && (sec->GetTexture(sector_t::ceiling) == skyflatnum || (sec->special&0xff) == Sector_Outside))
{
if (fogMap == NULL)
fogMap = GetSpecialLights (PalEntry (255,255,255), level.outsidefog, 0);
sec->ColorMap = fogMap;
}
else
{
if (normMap == NULL)
normMap = GetSpecialLights (PalEntry (255,255,255), level.fadeto, NormalLight.Desaturate);
sec->ColorMap = normMap;
}
}
else
{
if (normMap == NULL)
normMap = GetSpecialLights (PalEntry (255,255,255), level.fadeto, NormalLight.Desaturate);
sec->ColorMap = normMap;
if (lightcolor == -1) lightcolor = PalEntry(255,255,255);
if (fadecolor == -1)
{
if (level.outsidefog != 0xff000000 && (sec->GetTexture(sector_t::ceiling) == skyflatnum || (sec->special&0xff) == Sector_Outside))
fadecolor = level.outsidefog;
else
fadecolor = level.fadeto;
}
if (desaturation == -1) desaturation = NormalLight.Desaturate;
sec->ColorMap = GetSpecialLights (lightcolor, fadecolor, desaturation);
}
}