Potentially fixed targeting issues

This commit is contained in:
Anuken
2018-10-17 14:01:18 -04:00
parent 4614aacc02
commit 245dd39a60
2 changed files with 2 additions and 2 deletions

View File

@@ -143,7 +143,7 @@ public class Units{
/**Returns the closest target enemy. First, units are checked, then tile entities.*/
public static TargetTrait getClosestTarget(Team team, float x, float y, float range){
return getClosestTarget(team, x, y, range, u -> true);
return getClosestTarget(team, x, y, range, u -> !u.isDead() && u.isAdded());
}
/**Returns the closest target enemy. First, units are checked, then tile entities.*/