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