No shooting in the editor
This commit is contained in:
@@ -282,7 +282,7 @@ public class DesktopInput extends InputHandler{
|
||||
}
|
||||
}
|
||||
|
||||
shouldShoot = !scene.hasMouse() && !locked;
|
||||
shouldShoot = !scene.hasMouse() && !locked && !state.isEditor();
|
||||
|
||||
if(!locked && block == null && !scene.hasField() && !scene.hasDialog() &&
|
||||
//disable command mode when player unit can boost and command mode binding is the same
|
||||
|
||||
@@ -540,7 +540,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
lastLineY = tileY;
|
||||
}else if(!tryTapPlayer(worldx, worldy) && Core.settings.getBool("keyboard")){
|
||||
//shoot on touch down when in keyboard mode
|
||||
player.shooting = true;
|
||||
player.shooting = !state.isEditor();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1053,7 +1053,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
unit.movePref(movement);
|
||||
|
||||
//update shooting if not building + not mining
|
||||
if(!unit.activelyBuilding() && unit.mineTile == null){
|
||||
if(!unit.activelyBuilding() && unit.mineTile == null && !state.isEditor()){
|
||||
|
||||
//autofire targeting
|
||||
if(manualShooting){
|
||||
|
||||
Reference in New Issue
Block a user