From 1aed25f666758b30db17c990b3f8eaa05202fa17 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 7 Feb 2009 01:37:06 +0000 Subject: [PATCH] - Commented out the CALL_ACTION(A_Look, actor) for targetless friendly monsters in A_DoChase(). They can still find new targets without this, and with it, they got stuck on the first frame of their see state. SVN r1410 (trunk) --- docs/rh-log.txt | 3 +++ src/p_enemy.cpp | 9 ++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 85c8f9108..437fbec8e 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,7 @@ February 6, 2009 +- Commented out the CALL_ACTION(A_Look, actor) for targetless friendly + monsters in A_DoChase(). They can still find new targets without this, + and with it, they got stuck on the first frame of their see state. - Fixed: Keys bound in a custom key section would unbind the key in the main game section. - Fixed scrolling of the automap background on a rotated automap. diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index e4abed26f..c41a58dfd 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -1545,7 +1545,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Look) self->special = 0; self->goal = iterator.Next (); self->reactiontime = self->args[2] * TICRATE + level.maptime; - if (self->args[3] == 0) self->flags5 &=~ MF5_CHASEGOAL; + if (self->args[3] == 0) self->flags5 &= ~MF5_CHASEGOAL; else self->flags5 |= MF5_CHASEGOAL; } @@ -1583,7 +1583,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Look) if (self->IsFriend (targ)) // be a little more precise! { // If we find a valid target here, the wandering logic should *not* - // be activated! If would cause the seestate to be set twice. + // be activated! It would cause the seestate to be set twice. if (P_LookForPlayers (self, self->flags4 & MF4_LOOKALLAROUND)) goto seeyou; @@ -1610,8 +1610,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Look) goto seeyou; } } - - + if (!P_LookForPlayers (self, self->flags4 & MF4_LOOKALLAROUND)) return; @@ -1871,7 +1870,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi { if (actor->flags & MF_FRIENDLY) { - CALL_ACTION(A_Look, actor); + //CALL_ACTION(A_Look, actor); if (actor->target == NULL) { if (!dontmove) CALL_ACTION(A_Wander, actor);