many things
This commit is contained in:
@@ -59,7 +59,7 @@ abstract class CommanderComp implements Unitc{
|
||||
units.clear();
|
||||
|
||||
Units.nearby(team(), x, y, 200f, u -> {
|
||||
if(u.isAI() && include.get(u) && u != base()){
|
||||
if(u.isAI() && include.get(u) && u != self()){
|
||||
units.add(u);
|
||||
}
|
||||
});
|
||||
@@ -79,7 +79,7 @@ abstract class CommanderComp implements Unitc{
|
||||
controlling.addAll(units);
|
||||
for(Unit unit : units){
|
||||
FormationAI ai;
|
||||
unit.controller(ai = new FormationAI(base(), formation));
|
||||
unit.controller(ai = new FormationAI(self(), formation));
|
||||
spacing = Math.max(spacing, ai.formationSize());
|
||||
minFormationSpeed = Math.min(minFormationSpeed, unit.type().speed);
|
||||
}
|
||||
@@ -104,7 +104,7 @@ abstract class CommanderComp implements Unitc{
|
||||
void clearCommand(){
|
||||
//reset controlled units
|
||||
for(Unit unit : controlling){
|
||||
if(unit.controller().isBeingControlled(base())){
|
||||
if(unit.controller().isBeingControlled(self())){
|
||||
unit.controller(unit.type().createController());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user