Skip to content

Commit

Permalink
fix: do walk back handling
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas committed Dec 21, 2024
1 parent 34b6fa8 commit c11ccec
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/creatures/monsters/monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c11ccec

Please sign in to comment.