Skip to content

Commit

Permalink
Fix bug in pre path conditional check
Browse files Browse the repository at this point in the history
  • Loading branch information
NRH-AA committed Sep 17, 2024
1 parent 76241a5 commit ef92d7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ bool Map::getPathMatching(const Creature& creature, const Position& targetPos, s
if (startPos.getZ() != targetPos.getZ()) return false;

// We are next to our target. Let dance step decide.
if (!fpp.keepDistance && startPos.getDistanceX(targetPos) <= 1 && startPos.getDistanceY(targetPos) <= 1) {
if (fpp.maxTargetDist > 1 && startPos.getDistanceX(targetPos) <= 1 && startPos.getDistanceY(targetPos) <= 1) {
if (!creature.isSummon()) {
return true;
}
Expand Down

0 comments on commit ef92d7a

Please sign in to comment.