This commit is contained in:
Anuken 2025-12-07 11:18:49 -05:00
parent 3e29667f90
commit 8900967afe
3 changed files with 25 additions and 7 deletions

View file

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

View file

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

View file

@ -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();