- 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
parent eff5a4dad9
commit c5333d4abb
3 changed files with 14 additions and 7 deletions

View file

@ -1,4 +1,7 @@
April 5, 2008 (Changes by Graf Zahl) April 5, 2008 (Changes by Graf Zahl)
- 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 the option to use $ as a prefix to a string table name everywhere in - Added the option to use $ as a prefix to a string table name everywhere in
MAPINFO where 'lookup' could be specified so that there is one consistent MAPINFO where 'lookup' could be specified so that there is one consistent
way to do it. way to do it.

View file

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

View file

@ -331,7 +331,7 @@ void WI_LoadBackground(bool isenterpic)
// If going from E1-E3 to E4 the default should be used, not the exit pic. // If going from E1-E3 to E4 the default should be used, not the exit pic.
// Not if the exit pic is user defined! // Not if the exit pic is user defined!
if (level.info->exitpic[0]!=0) return; if (level.info->exitpic != NULL && level.info->exitpic[0]!=0) return;
// E1-E3 need special treatment when playing Doom 1. // E1-E3 need special treatment when playing Doom 1.
if (gamemode!=commercial) if (gamemode!=commercial)