From c11ccec3f2cbf1ddc43f541dc52fe7eeb41eb933 Mon Sep 17 00:00:00 2001 From: Eduardo Dantas Date: Sat, 21 Dec 2024 00:46:28 -0300 Subject: [PATCH] fix: do walk back handling --- src/creatures/monsters/monster.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/creatures/monsters/monster.cpp b/src/creatures/monsters/monster.cpp index 7276bea19d1..8dd4953822b 100644 --- a/src/creatures/monsters/monster.cpp +++ b/src/creatures/monsters/monster.cpp @@ -1508,6 +1508,11 @@ void Monster::doRandomStep(Direction &nextDirection, bool &result) { } void Monster::doWalkBack(uint32_t &flags, Direction &nextDirection, bool &result) { + if (totalPlayersOnScreen > 0) { + isWalkingBack = false; + return; + } + result = Creature::getNextStep(nextDirection, flags); if (result) { flags |= FLAG_PATHFINDING;