From e9f129678153c9ea7059b103d1a74d552e03c815 Mon Sep 17 00:00:00 2001 From: Eric Hoey <121978037+A-Green-Spoon@users.noreply.github.com> Date: Wed, 3 Sep 2025 14:48:46 -0400 Subject: [PATCH] add scene check to hook and custom message --- soh/soh/Enhancements/randomizer/hook_handlers.cpp | 2 +- soh/soh/OTRGlobals.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/hook_handlers.cpp b/soh/soh/Enhancements/randomizer/hook_handlers.cpp index bf2722f80..ed20eaf7c 100644 --- a/soh/soh/Enhancements/randomizer/hook_handlers.cpp +++ b/soh/soh/Enhancements/randomizer/hook_handlers.cpp @@ -1445,7 +1445,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l break; } case VB_GERUDO_GUARD_SET_ACTION_AFTER_TALK: - if (gPlayState->msgCtx.choiceIndex == 0) { + if (gPlayState->msgCtx.choiceIndex == 0 && gPlayState->sceneNum == SCENE_GERUDOS_FORTRESS) { EnGe2* enGe2 = va_arg(args, EnGe2*); EnGe2_SetupCapturePlayer(enGe2, gPlayState); *should = false; diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index 7d2194cca..5fefe3003 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -2510,7 +2510,8 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) { } else if (textId == TEXT_BIG_POE_COLLECTED_RANDO) { messageEntry = CustomMessageManager::Instance->RetrieveMessage(customMessageTableID, textId, MF_AUTO_FORMAT); - } else if (textId == TEXT_GERUDO_GUARD_FRIENDLY && player->talkActor->id == ACTOR_EN_GE2) { + } else if (textId == TEXT_GERUDO_GUARD_FRIENDLY && player->talkActor->id == ACTOR_EN_GE2 && + gPlayState->sceneNum == SCENE_GERUDOS_FORTRESS) { // TODO_TRANSLATE Translate into french and german messageEntry = CustomMessage("Want me to throw you in jail?&\x1B#Yes please&No thanks#", { QM_GREEN }); messageEntry.AutoFormat();