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

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