From e6e5bf8105bae458967403b454581c2a7e8795e0 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Wed, 21 Jan 2026 20:23:33 -0500 Subject: [PATCH] Fixed bug in pause code. It wasn't pausing everything. --- draugnorak.nvgt | 2 ++ src/player.nvgt | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/draugnorak.nvgt b/draugnorak.nvgt index a576495..a14df01 100644 --- a/draugnorak.nvgt +++ b/draugnorak.nvgt @@ -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; diff --git a/src/player.nvgt b/src/player.nvgt index d33ae6f..ff2db2c 100644 --- a/src/player.nvgt +++ b/src/player.nvgt @@ -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(); + } +}