From f852d70767c68139a85826f34103bedc60b8d124 Mon Sep 17 00:00:00 2001 From: Jordan Longstaff Date: Mon, 9 Dec 2024 21:24:37 -0500 Subject: [PATCH] Properly replicate NaviTalk kill check (#4647) * Restrict disabled Navi workaround to Dodongo's Cavern * Properly replicate NaviTalk kill check * Move `*should = false` out of condition --- soh/soh/Enhancements/timesaver_hook_handlers.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/soh/soh/Enhancements/timesaver_hook_handlers.cpp b/soh/soh/Enhancements/timesaver_hook_handlers.cpp index 86e8c37e9..74a2f2138 100644 --- a/soh/soh/Enhancements/timesaver_hook_handlers.cpp +++ b/soh/soh/Enhancements/timesaver_hook_handlers.cpp @@ -340,11 +340,14 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li if (ForcedDialogIsDisabled(FORCED_DIALOG_SKIP_NAVI)) { ElfMsg* naviTalk = va_arg(args, ElfMsg*); int32_t paramsHighByte = naviTalk->actor.params >> 8; - if ((paramsHighByte & 0x80) == 0 && (paramsHighByte & 0x3F) != 0x3F) { - Flags_SetSwitch(gPlayState, paramsHighByte & 0x3F); - Actor_Kill(&naviTalk->actor); - *should = false; + if ((paramsHighByte & 0x80) != 0) { + break; } + if ((paramsHighByte & 0x3F) != 0x3F) { + Flags_SetSwitch(gPlayState, paramsHighByte & 0x3F); + } + Actor_Kill(&naviTalk->actor); + *should = false; } break; }