- Rewrote the SeePastShootableLines check in P_SightCheckLine() to be

more readable.


SVN r1270 (trunk)
This commit is contained in:
Randy Heit 2008-10-19 02:00:00 +00:00
parent 6aa72c84d6
commit 633154d46f
2 changed files with 19 additions and 9 deletions

View file

@ -1,4 +1,6 @@
October 18, 2008
- Rewrote the SeePastShootableLines check in P_SightCheckLine() to be
more readable.
- Commented out the MugShot state nulling in DSBarInfo::AttachToPlayer() so
that fiddling with player options does not reset the mug shot.
- Fixed: SetMugShotState ACS command did not pop the stack.

View file

@ -134,16 +134,24 @@ static bool P_SightCheckLine (line_t *ld)
{
return false;
}
if (SeePastShootableLines &&
(!(ld->activation & SPAC_Impact) ||
(ld->special != ACS_Execute && ld->special != ACS_ExecuteAlways)) ||
(ld->args[1] != 0 && ld->args[1] != level.levelnum))
// Pretend the other side is invisible if this is not an impact line
// that runs a script on the current map. Used to prevent monsters
// from trying to attack through a block everything line unless
// there's a chance their attack will make it nonblocking.
if (!SeePastShootableLines)
{
// Pretend the other side is invisible if this is not an impact line
// or it does not run a script on the current map. Used to prevent
// monsters from trying to attack through a block everything line
// unless there's a chance their attack will make it nonblocking.
return false;
if (!(ld->activation & SPAC_Impact))
{
return false;
}
if (ld->special != ACS_Execute && ld->special != ACS_ExecuteAlways)
{
return false;
}
if (ld->args[1] != 0 && ld->args[1] != level.levelnum)
{
return false;
}
}
}