diff --git a/docs/rh-log.txt b/docs/rh-log.txt index f569d1484..f13ba337a 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,8 @@ +July 1, 2006 (Changes by Graf Zahl) +- Fixed: In multiplayer games, when trying to change targets, A_Chase forgot + to check whether the new target was the same as the old one and treated + this case as a real target change. + June 29, 2006 - Added some hackery at the start of MouseRead_Win32() that prevents it from yanking the mouse around if they keys haven't been read yet to combat the diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index 5d8ad6a9c..e5cf442bd 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -2009,12 +2009,13 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi actor->flags3 &= ~MF3_NOSIGHTCHECK; lookForBetter = true; } + AActor * oldtarget = actor->target; gotNew = P_LookForPlayers (actor, true); if (lookForBetter) { actor->flags3 |= MF3_NOSIGHTCHECK; } - if (gotNew) + if (gotNew && actor->target != oldtarget) { actor->flags &= ~MF_INCHASE; return; // got a new target