From 9a422245f3740c7ffe7876e4232eb101f23d6e47 Mon Sep 17 00:00:00 2001 From: MajorCooke Date: Wed, 27 Jan 2016 13:11:22 -0600 Subject: [PATCH] - Fixed a couple issues with calling P_NewChaseDir from wrongful P_Move priority. --- src/p_enemy.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index 98162beb8..5e58d9510 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -2507,16 +2507,11 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi fixed_t oldY = actor->Y(); FTextureID oldFloor = actor->floorpic; - bool movecheck = P_Move(actor); // chase towards player - if (actor->movecount >= 0 || !movecheck) - actor->movecount--; - if (!(flags & CHF_STOPIFBLOCKED)) + if ((--actor->movecount < 0 && !(flags & CHF_NORANDOMTURN)) || (!P_Move(actor) && !(flags & CHF_STOPIFBLOCKED))) { - if ((!(flags & CHF_NORANDOMTURN) && (actor->movecount < 0)) || !movecheck) - P_NewChaseDir(actor); + P_NewChaseDir(actor); } - // if the move was illegal, reset it // (copied from A_SerpentChase - it applies to everything with CANTLEAVEFLOORPIC!) if (actor->flags2&MF2_CANTLEAVEFLOORPIC && actor->floorpic != oldFloor )