Skip to content

Commit

Permalink
Fix non-aggressive targeting not stopping when within range of the ta…
Browse files Browse the repository at this point in the history
…rget
  • Loading branch information
fullwall committed Jul 24, 2016
1 parent 449a788 commit a4229d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/net/citizensnpcs/npc/ai/MCTargetStrategy.java
Expand Up @@ -105,8 +105,9 @@ public boolean update() {
if (cancelReason != null) {
return true;
}
if (!aggro && distanceSquared() < parameters.distanceMargin()) {
if (!aggro && distanceSquared() <= parameters.distanceMargin()) {
stop();
return false;
} else if (updateCounter++ > parameters.updatePathRate()) {
targetNavigator.setPath();
updateCounter = 0;
Expand Down

0 comments on commit a4229d1

Please sign in to comment.