Unit command tweaks

This commit is contained in:
Anuken 2022-05-07 00:41:27 -04:00
parent 8b2d4d8f3e
commit 9c86433047

View File

@ -709,6 +709,13 @@ public class MobileInput extends InputHandler implements GestureListener{
commandMode = false;
}
//validate commanding units
selectedUnits.removeAll(u -> !u.isCommandable() || !u.isValid());
if(!commandMode){
selectedUnits.clear();
}
//zoom camera
if(!locked && Math.abs(Core.input.axisTap(Binding.zoom)) > 0 && !Core.input.keyDown(Binding.rotateplaced) && (Core.input.keyDown(Binding.diagonal_placement) || ((!player.isBuilder() || !isPlacing() || !block.rotate) && selectPlans.isEmpty()))){
renderer.scaleCamera(Core.input.axisTap(Binding.zoom));