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() &&
|
if(!locked && block == null && !scene.hasField() && !scene.hasDialog() &&
|
||||||
//disable command mode when player unit can boost and command mode binding is the same
|
//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;
|
lastLineY = tileY;
|
||||||
}else if(!tryTapPlayer(worldx, worldy) && Core.settings.getBool("keyboard")){
|
}else if(!tryTapPlayer(worldx, worldy) && Core.settings.getBool("keyboard")){
|
||||||
//shoot on touch down when in keyboard mode
|
//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);
|
unit.movePref(movement);
|
||||||
|
|
||||||
//update shooting if not building + not mining
|
//update shooting if not building + not mining
|
||||||
if(!unit.activelyBuilding() && unit.mineTile == null){
|
if(!unit.activelyBuilding() && unit.mineTile == null && !state.isEditor()){
|
||||||
|
|
||||||
//autofire targeting
|
//autofire targeting
|
||||||
if(manualShooting){
|
if(manualShooting){
|
||||||
|
|||||||
Reference in New Issue
Block a user