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()); (!isBuilding && !Core.settings.getBool("buildautopause") || player.unit().isBuilding() || !player.dead() && !player.unit().spawnedByCore());
} }
@Override
public void reset(){
super.reset();
shouldShoot = false;
deleting = false;
}
@Override @Override
public void buildUI(Group group){ public void buildUI(Group group){
//building and respawn hints //building and respawn hints

View File

@@ -154,13 +154,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
}); });
Events.on(ResetEvent.class, e -> { Events.on(ResetEvent.class, e -> {
logicCutscene = false; reset();
commandBuildings.clear();
selectedUnits.clear();
itemDepositCooldown = 0f;
Arrays.fill(controlGroups, null);
lastUnit = null;
lastPlans.clear();
}); });
} }
@@ -885,6 +879,17 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
camera.position.set(unit); 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(){ public void update(){
if(spectating != null && (!spectating.isValid() || spectating.team != player.team())){ if(spectating != null && (!spectating.isValid() || spectating.team != player.team())){
spectating = null; 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 @Override
public void update(){ public void update(){
super.update(); super.update();