Added more hints
This commit is contained in:
@@ -29,9 +29,14 @@ abstract class CommanderComp implements Entityc, Posc{
|
||||
transient float minFormationSpeed;
|
||||
|
||||
public void update(){
|
||||
if(controlling.isEmpty()){
|
||||
formation = null;
|
||||
}
|
||||
|
||||
if(formation != null){
|
||||
formation.anchor.set(x, y, 0);
|
||||
formation.updateSlots();
|
||||
controlling.removeAll(u -> u.dead || !(u.controller() instanceof FormationAI ai && ai.leader == self()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,6 +69,8 @@ abstract class CommanderComp implements Entityc, Posc{
|
||||
}
|
||||
});
|
||||
|
||||
if(units.isEmpty()) return;
|
||||
|
||||
//sort by hitbox size, then by distance
|
||||
units.sort(Structs.comps(Structs.comparingFloat(u -> -u.hitSize), Structs.comparingFloat(u -> u.dst2(this))));
|
||||
units.truncate(type.commandLimit);
|
||||
|
||||
Reference in New Issue
Block a user