Fixed bug in pause code. It wasn't pausing everything.

This commit is contained in:
Storm Dragon
2026-01-21 20:23:33 -05:00
parent 3cb5b926a0
commit e6e5bf8105
2 changed files with 16 additions and 0 deletions
+2
View File
@@ -126,6 +126,8 @@ void main()
speak_with_history("Paused. Press backspace to resume.", true);
} else {
p.resume_all();
// Restart all timers to prevent time from accumulating while paused
restart_all_timers();
speak_with_history("Resumed.", true);
}
continue;
+14
View File
@@ -53,3 +53,17 @@ bool searching = false;
// Pause state
bool game_paused = false;
// Restart all game timers when resuming from pause
// Prevents time from accumulating while paused
void restart_all_timers() {
// Player timers
fire_damage_timer.restart();
healing_timer.restart();
sling_charge_timer.restart();
// Fire fuel timers
for (uint i = 0; i < world_fires.length(); i++) {
world_fires[i].fuel_timer.restart();
}
}