From 89f346345b5b9557de25537d1c17035af3630640 Mon Sep 17 00:00:00 2001 From: ravepossum <145081120+ravepossum@users.noreply.github.com> Date: Tue, 14 Nov 2023 10:24:46 -0500 Subject: [PATCH] Adding clock offset init to debug menu cheat start (#3561) Co-authored-by: ravepossum --- src/debug.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/debug.c b/src/debug.c index 8489a265c0..9db4862120 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); }