mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-27 15:02:03 -08:00
Bugfixes
This commit is contained in:
parent
f4a838df98
commit
7482e2a988
8 changed files with 176 additions and 157 deletions
|
|
@ -262,7 +262,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||
if(commander.isCommanding()){
|
||||
commander.clearCommand();
|
||||
}else{
|
||||
FormationPattern pattern = new SquareFormation();
|
||||
SquareFormation pattern = new SquareFormation();
|
||||
Formation formation = new Formation(new Vec3(player.x, player.y, player.unit().rotation), pattern);
|
||||
formation.slotAssignmentStrategy = new DistanceAssignmentStrategy(pattern);
|
||||
|
||||
|
|
@ -278,6 +278,8 @@ 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 * 2.4f;
|
||||
|
||||
commander.command(formation, units);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue