From 9c86433047ef1285581cc5d804ab3ed67934444e Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 7 May 2022 00:41:27 -0400 Subject: [PATCH] Unit command tweaks --- core/src/mindustry/input/MobileInput.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/src/mindustry/input/MobileInput.java b/core/src/mindustry/input/MobileInput.java index f708412ef5..07c7f1f479 100644 --- a/core/src/mindustry/input/MobileInput.java +++ b/core/src/mindustry/input/MobileInput.java @@ -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));