Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturKnopik committed Dec 29, 2024
1 parent e82c409 commit cfeb7ff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@ void Monster::goToFollowCreature()
} else { // maxTargetDist > 1
if (!getDistanceStep(followCreature->getPosition(), dir)) {
// if we can't get anything then let the A* calculate
updateFollowCreaturePath(fpp);
listWalkDir.clear();
if (getPathTo(followCreature->getPosition(), listWalkDir, fpp)) {
hasFollowPath = true;
Expand All @@ -612,6 +613,7 @@ void Monster::goToFollowCreature()
startAutoWalk();
}
} else {
updateFollowCreaturePath(fpp);
listWalkDir.clear();
if (getPathTo(followCreature->getPosition(), listWalkDir, fpp)) {
hasFollowPath = true;
Expand Down

0 comments on commit cfeb7ff

Please sign in to comment.