From 3b8c8282c6b69dacb84d6ceaf9ed82636db2c3e8 Mon Sep 17 00:00:00 2001 From: ravepossum Date: Mon, 13 Nov 2023 14:41:10 -0500 Subject: [PATCH] Adding clock offset init to debug menu cheat start --- src/debug.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/debug.c b/src/debug.c index 8489a265c027..9db4862120e6 100644 --- a/src/debug.c +++ b/src/debug.c @@ -43,6 +43,7 @@ #include "pokemon_storage_system.h" #include "random.h" #include "region_map.h" +#include "rtc.h" #include "script.h" #include "script_pokemon_util.h" #include "sound.h" @@ -2120,6 +2121,9 @@ static void DebugAction_Util_Clear_Boxes(u8 taskId) static void DebugAction_Util_CheatStart(u8 taskId) { + if (!FlagGet(FLAG_SYS_CLOCK_SET)) + RtcInitLocalTimeOffset(0, 0); + InitTimeBasedEvents(); Debug_DestroyMenu_Full_Script(taskId, Debug_CheatStart); }