- If an actor's current target temporarily goes unshootable, its threshold

is now reset to 0, so it will more readily switch back to it.


SVN r1006 (trunk)
This commit is contained in:
Randy Heit 2008-05-31 03:39:57 +00:00
parent d657e31a8c
commit ded428230d
2 changed files with 10 additions and 0 deletions

View file

@ -1,4 +1,6 @@
May 30, 2008 May 30, 2008
- If an actor's current target temporarily goes unshootable, its threshold
is now reset to 0, so it will more readily switch back to it.
- Fixed: Deactivating the game no longer allows reverb effects to continue - Fixed: Deactivating the game no longer allows reverb effects to continue
playing while the sound is paused. playing while the sound is paused.
- Fixed: S_StartNamedSound() looked for SECF_SILENT in MoreFlags instead of - Fixed: S_StartNamedSound() looked for SECF_SILENT in MoreFlags instead of

View file

@ -1852,6 +1852,14 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi
} }
if (!actor->target || !(actor->target->flags & MF_SHOOTABLE)) if (!actor->target || !(actor->target->flags & MF_SHOOTABLE))
{ // look for a new target { // look for a new target
if (actor->target != NULL && (actor->target->flags2 & MF2_NONSHOOTABLE))
{
// Target is only temporarily unshootable, so remember it.
actor->lastenemy = actor->target;
// Switch targets faster, since we're only changing because we can't
// hurt our old one temporarily.
actor->threshold = 0;
}
if (P_LookForPlayers (actor, true) && actor->target != actor->goal) if (P_LookForPlayers (actor, true) && actor->target != actor->goal)
{ // got a new target { // got a new target
actor->flags &= ~MF_INCHASE; actor->flags &= ~MF_INCHASE;