From 804584e79d1b43c58f1b1795b4d832870f1cc15b Mon Sep 17 00:00:00 2001 From: Garrett Cox Date: Fri, 25 Oct 2024 23:35:22 -0500 Subject: [PATCH] Fix rainbow bridge sound spam --- soh/soh/Enhancements/timesaver_hook_handlers.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/soh/soh/Enhancements/timesaver_hook_handlers.cpp b/soh/soh/Enhancements/timesaver_hook_handlers.cpp index 3bfd0da6f..8088f1d51 100644 --- a/soh/soh/Enhancements/timesaver_hook_handlers.cpp +++ b/soh/soh/Enhancements/timesaver_hook_handlers.cpp @@ -610,7 +610,11 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li case VB_PLAY_RAINBOW_BRIDGE_CS: { if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) { *should = false; - func_800F595C(NA_BGM_BRIDGE_TO_GANONS); + if (!Flags_GetEventChkInf(EVENTCHKINF_RAINBOW_BRIDGE_BUILT)) { + func_800F595C(NA_BGM_BRIDGE_TO_GANONS); + // This would have been set 2 frames later, but we're skipping now so the sound doesn't play twice + Flags_SetEventChkInf(EVENTCHKINF_RAINBOW_BRIDGE_BUILT); + } } break; }