Skip to content

Commit

Permalink
stop attacking invalid targets
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Mar 16, 2019
1 parent de6a0f7 commit eda3ac7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/org/mcmonkey/sentinel/SentinelTrait.java
Expand Up @@ -1027,6 +1027,11 @@ else if (needsToUnpause && npc.hasTrait(Waypoints.class)) {
targetingHelper.updateAvoids();
double crsq = chaseRange * chaseRange;
boolean goHome = chased;
if (chasing != null) {
if (!chasing.isValid() || !targetingHelper.isTargeted(chasing)) {
chasing = null;
}
}
LivingEntity target = targetingHelper.findBestTarget();
if (target != null) {
Location near = nearestPathPoint();
Expand Down

0 comments on commit eda3ac7

Please sign in to comment.