Command mode hold

This commit is contained in:
Anuken
2022-02-10 17:40:22 -05:00
parent 907d2a46b2
commit 50f704096f

View File

@@ -278,18 +278,13 @@ public class DesktopInput extends InputHandler{
shouldShoot = !scene.hasMouse() && !locked;
if(!locked && state.rules.unitCommand && block == null){
if(input.keyTap(Binding.commandMode)){
commandMode = !commandMode;
}
//if(input.keyTap(Binding.commandMode)){
commandMode = input.keyDown(Binding.commandMode);
//}
}else{
commandMode = false;
}
//TODO should selected units be cleared out of command mode?
if(!commandMode){
//selectedUnits.clear();
}
//validate commanding units
selectedUnits.removeAll(u -> !u.isCommandable() || !u.isValid());