Formation cleanup
This commit is contained in:
@@ -266,7 +266,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
if(commander.isCommanding()){
|
||||
commander.clearCommand();
|
||||
}else{
|
||||
SquareFormation pattern = new SquareFormation();
|
||||
FormationPattern pattern = new SquareFormation();
|
||||
Formation formation = new Formation(new Vec3(player.x, player.y, player.unit().rotation), pattern);
|
||||
formation.slotAssignmentStrategy = new DistanceAssignmentStrategy(pattern);
|
||||
|
||||
@@ -282,8 +282,6 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
units.sort(u -> u.dst2(player.unit()));
|
||||
units.truncate(player.unit().type().commandLimit);
|
||||
|
||||
if(units.any()) pattern.spacing = units.max(u -> u.hitSize).hitSize * 2f;
|
||||
|
||||
commander.command(formation, units);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user