Skip to content

Commit dc973eb

Browse files
authored
fix: do walk back handling (#3189)
1 parent 441dd65 commit dc973eb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/creatures/monsters/monster.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,6 +1510,11 @@ void Monster::doRandomStep(Direction &nextDirection, bool &result) {
15101510
}
15111511

15121512
void Monster::doWalkBack(uint32_t &flags, Direction &nextDirection, bool &result) {
1513+
if (totalPlayersOnScreen > 0) {
1514+
isWalkingBack = false;
1515+
return;
1516+
}
1517+
15131518
result = Creature::getNextStep(nextDirection, flags);
15141519
if (result) {
15151520
flags |= FLAG_PATHFINDING;

0 commit comments

Comments
 (0)