- Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This

lets A_Look() always put the actor into its see state. This problem could
  be heard by an Archvile's resurrectee playing its see sound but failing to
  enter its see state because it was called from A_Chase().


SVN r1399 (trunk)
This commit is contained in:
Randy Heit 2009-02-04 02:29:59 +00:00
parent b983886acd
commit 403b2c3c56
2 changed files with 11 additions and 6 deletions

View file

@ -1,4 +1,8 @@
February 3, 2009 February 3, 2009
- Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This
lets A_Look() always put the actor into its see state. This problem could
be heard by an Archvile's resurrectee playing its see sound but failing to
enter its see state because it was called from A_Chase().
- Fixed: SBARINFO used different rounding modes for the background and - Fixed: SBARINFO used different rounding modes for the background and
foreground of the DrawBar command. foreground of the DrawBar command.
- Bumped MINSAVEVER to coincide with the new MAPINFO merge. - Bumped MINSAVEVER to coincide with the new MAPINFO merge.

View file

@ -1590,10 +1590,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Look)
// Let the self wander around aimlessly looking for a fight // Let the self wander around aimlessly looking for a fight
if (self->SeeState != NULL) if (self->SeeState != NULL)
{ {
if (!(self->flags & MF_INCHASE)) self->SetState (self->SeeState);
{
self->SetState (self->SeeState);
}
} }
else else
{ {
@ -1638,7 +1635,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Look)
} }
} }
if (self->target && !(self->flags & MF_INCHASE)) if (self->target)
{ {
self->SetState (self->SeeState); self->SetState (self->SeeState);
} }
@ -1757,6 +1754,10 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi
{ {
int delta; int delta;
if (actor->flags & MF_INCHASE)
{
return;
}
actor->flags |= MF_INCHASE; actor->flags |= MF_INCHASE;
// [RH] Andy Baker's stealth monsters // [RH] Andy Baker's stealth monsters
@ -2183,7 +2184,6 @@ static bool P_CheckForResurrection(AActor *self, bool usevilestates)
S_Sound (corpsehit, CHAN_BODY, "vile/raise", 1, ATTN_IDLE); S_Sound (corpsehit, CHAN_BODY, "vile/raise", 1, ATTN_IDLE);
info = corpsehit->GetDefault (); info = corpsehit->GetDefault ();
corpsehit->SetState (raisestate);
corpsehit->height = info->height; // [RH] Use real mobj height corpsehit->height = info->height; // [RH] Use real mobj height
corpsehit->radius = info->radius; // [RH] Use real radius corpsehit->radius = info->radius; // [RH] Use real radius
/* /*
@ -2207,6 +2207,7 @@ static bool P_CheckForResurrection(AActor *self, bool usevilestates)
// You are the Archvile's minion now, so hate what it hates // You are the Archvile's minion now, so hate what it hates
corpsehit->CopyFriendliness (self, false); corpsehit->CopyFriendliness (self, false);
corpsehit->SetState (raisestate);
return true; return true;
} }