No shooting in the editor

This commit is contained in:
Anuken
2025-09-19 14:08:17 -04:00
parent e5fc44166d
commit cc4119a837
2 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -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){