From b2e99b8ff5f17b70dac2d880087b6af7cada18bb Mon Sep 17 00:00:00 2001 From: Jordan Longstaff Date: Mon, 21 Oct 2024 02:36:47 -0400 Subject: [PATCH] Zora's River waterfall opens instantly (#4454) * Zora's River waterfall opens instantly * VB cleanup * Move it all to VB hook * Fix build errors * Null safety --- soh/soh/Enhancements/timesaver_hook_handlers.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/soh/soh/Enhancements/timesaver_hook_handlers.cpp b/soh/soh/Enhancements/timesaver_hook_handlers.cpp index 317c751a3..f496bcdf4 100644 --- a/soh/soh/Enhancements/timesaver_hook_handlers.cpp +++ b/soh/soh/Enhancements/timesaver_hook_handlers.cpp @@ -22,6 +22,7 @@ extern "C" { #include "src/overlays/actors/ovl_En_Tk/z_en_tk.h" #include "src/overlays/actors/ovl_En_Fu/z_en_fu.h" #include "src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.h" +#include "src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.h" #include "src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.h" #include "src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.h" #include "src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.h" @@ -200,11 +201,17 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li case VB_PLAY_ONEPOINT_CS: { if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), IS_RANDO)) { s16* csId = va_arg(args, s16*); + BgSpot03Taki* taki = NULL; switch (*csId) { case 4180: case 4100: *should = false; RateLimitedSuccessChime(); + taki = (BgSpot03Taki*)Actor_FindNearby(gPlayState, &GET_PLAYER(gPlayState)->actor, + ACTOR_BG_SPOT03_TAKI, ACTORCAT_BG, 999.0f); + if (taki != NULL) { + func_8003EBF8(gPlayState, &gPlayState->colCtx.dyna, taki->dyna.bgId); + } break; default: SPDLOG_INFO("VB_PLAY_ONEPOINT_CS {}", *csId);