mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-23 21:12:52 -08:00
Fixed #11425
This commit is contained in:
parent
3e29667f90
commit
8900967afe
3 changed files with 25 additions and 7 deletions
|
|
@ -68,6 +68,13 @@ public class DesktopInput extends InputHandler{
|
|||
(!isBuilding && !Core.settings.getBool("buildautopause") || player.unit().isBuilding() || !player.dead() && !player.unit().spawnedByCore());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset(){
|
||||
super.reset();
|
||||
shouldShoot = false;
|
||||
deleting = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildUI(Group group){
|
||||
//building and respawn hints
|
||||
|
|
|
|||
|
|
@ -154,13 +154,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||
});
|
||||
|
||||
Events.on(ResetEvent.class, e -> {
|
||||
logicCutscene = false;
|
||||
commandBuildings.clear();
|
||||
selectedUnits.clear();
|
||||
itemDepositCooldown = 0f;
|
||||
Arrays.fill(controlGroups, null);
|
||||
lastUnit = null;
|
||||
lastPlans.clear();
|
||||
reset();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -885,6 +879,17 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||
camera.position.set(unit);
|
||||
}
|
||||
|
||||
public void reset(){
|
||||
logicCutscene = false;
|
||||
commandBuildings.clear();
|
||||
selectedUnits.clear();
|
||||
itemDepositCooldown = 0f;
|
||||
Arrays.fill(controlGroups, null);
|
||||
lastUnit = null;
|
||||
lastPlans.clear();
|
||||
player.shooting = false;
|
||||
}
|
||||
|
||||
public void update(){
|
||||
if(spectating != null && (!spectating.isValid() || spectating.team != player.team())){
|
||||
spectating = null;
|
||||
|
|
|
|||
|
|
@ -744,6 +744,12 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset(){
|
||||
super.reset();
|
||||
manualShooting = down = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(){
|
||||
super.update();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue