diff --git a/core/src/mindustry/logic/LExecutor.java b/core/src/mindustry/logic/LExecutor.java index 94b4e6fa5d..1fcf1b37d1 100644 --- a/core/src/mindustry/logic/LExecutor.java +++ b/core/src/mindustry/logic/LExecutor.java @@ -715,6 +715,7 @@ public class LExecutor{ if((base instanceof Building && timer.get(30f)) || (ai != null && ai.checkTargetTimer(this))){ //if any of the targets involve enemies boolean enemies = target1 == RadarTarget.enemy || target2 == RadarTarget.enemy || target3 == RadarTarget.enemy; + boolean allies = target1 == RadarTarget.ally || target2 == RadarTarget.ally || target3 == RadarTarget.ally; best = null; bestValue = 0; @@ -726,6 +727,11 @@ public class LExecutor{ find(r, range, sortDir, data.items[i].team); } } + }else if(!allies){ + Seq data = state.teams.present; + for(int i = 0; i < data.size; i++){ + find(r, range, sortDir, data.items[i].team); + } }else{ find(r, range, sortDir, r.team()); }