- 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 October 18, 2008
- Rewrote the SeePastShootableLines check in P_SightCheckLine() to be
more readable.
- Commented out the MugShot state nulling in DSBarInfo::AttachToPlayer() so - Commented out the MugShot state nulling in DSBarInfo::AttachToPlayer() so
that fiddling with player options does not reset the mug shot. that fiddling with player options does not reset the mug shot.
- Fixed: SetMugShotState ACS command did not pop the stack. - Fixed: SetMugShotState ACS command did not pop the stack.

View file

@ -134,17 +134,25 @@ static bool P_SightCheckLine (line_t *ld)
{ {
return false; 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 // 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 // that runs a script on the current map. Used to prevent monsters
// monsters from trying to attack through a block everything line // from trying to attack through a block everything line unless
// unless there's a chance their attack will make it nonblocking. // there's a chance their attack will make it nonblocking.
if (!SeePastShootableLines)
{
if (!(ld->activation & SPAC_Impact))
{
return false; 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;
}
}
} }
sightcounts[3]++; sightcounts[3]++;