- Changed secret sector drawing in automap so that lines with the ML_SECRET

flag are only drawn as part of a secret sector if that secret has already
  been found, even if the option is set to always show secret sectors.
- Added a NULL pointer check to WI_LoadBackground.


SVN r885 (trunk)
This commit is contained in:
Christoph Oelckers 2008-04-05 19:10:37 +00:00
commit c5333d4abb
3 changed files with 14 additions and 7 deletions

View file

@ -1297,15 +1297,19 @@ static bool AM_CheckSecret(line_t *line)
{
if (line->frontsector != NULL)
{
if (line->frontsector->oldspecial &&
(am_map_secrets==2 || (am_map_secrets==1 && !(line->frontsector->special&SECRET_MASK))))
return true;
if (line->frontsector->oldspecial)
{
if (am_map_secrets!=0 && !(line->frontsector->special&SECRET_MASK)) return true;
if (am_map_secrets==2 && !(line->flags & ML_SECRET)) return true;
}
}
if (line->backsector != NULL)
{
if (line->backsector->oldspecial &&
(am_map_secrets==2 || (am_map_secrets==1 && !(line->backsector->special&SECRET_MASK))))
return true;
if (line->backsector->oldspecial)
{
if (am_map_secrets!=0 && !(line->backsector->special&SECRET_MASK)) return true;
if (am_map_secrets==2 && !(line->flags & ML_SECRET)) return true;
}
}
return false;
}