Fixed #3078 + action listeners for player control events

This commit is contained in:
Anuken
2020-10-23 15:59:52 -04:00
parent 5512c1817d
commit c8ef7ebafb
7 changed files with 39 additions and 9 deletions
+1 -1
View File
@@ -613,7 +613,7 @@ public class MobileInput extends InputHandler implements GestureListener{
//reset payload target
payloadTarget = null;
//apply command on double tap when own unit is tapped
if(Mathf.within(worldx, worldy, player.unit().x, player.unit().y, player.unit().hitSize * 0.6f + 8f)){
if(!player.dead() && Mathf.within(worldx, worldy, player.unit().x, player.unit().y, player.unit().hitSize * 0.6f + 8f) && player.unit().type.commandLimit > 0){
Call.unitCommand(player);
}else{
//control a unit/block