mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-09 04:09:07 +07:00
Fixed #5922
This commit is contained in:
parent
94a340d3ee
commit
8224cc3fce
@ -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<TeamData> 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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user