From f73a7ca01ed8b311eceeeadc2962a1a0abd42096 Mon Sep 17 00:00:00 2001 From: Haze Weathers Date: Tue, 10 Dec 2024 00:27:51 -0500 Subject: [PATCH] fix speedrun timer credits crash --- autoloads/speedrun_timer.gd | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/autoloads/speedrun_timer.gd b/autoloads/speedrun_timer.gd index 7f269cc..5a3c4ff 100644 --- a/autoloads/speedrun_timer.gd +++ b/autoloads/speedrun_timer.gd @@ -20,9 +20,10 @@ func _process(delta: float) -> void: if visible: time_counter.text = Game.format_time(time) - var map = Game.get_map() - if is_instance_valid(map): - if (Game.has_collection_bonus() && Game.time <= map.target_time_100) or (!Game.has_collection_bonus() && Game.time <= map.target_time_any): - time_counter.modulate = bonus_color - return - time_counter.modulate = Color.white + if timer_running: + var map = Game.get_map() + if is_instance_valid(map): + if (Game.has_collection_bonus() && Game.time <= map.target_time_100) or (!Game.has_collection_bonus() && Game.time <= map.target_time_any): + time_counter.modulate = bonus_color + return + time_counter.modulate = Color.white