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
This commit is contained in:
Jordan Longstaff 2024-10-21 02:36:47 -04:00 committed by GitHub
parent df6763257b
commit b2e99b8ff5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,6 +22,7 @@ extern "C" {
#include "src/overlays/actors/ovl_En_Tk/z_en_tk.h" #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_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_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_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_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.h"
#include "src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.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: { case VB_PLAY_ONEPOINT_CS: {
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), IS_RANDO)) { if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), IS_RANDO)) {
s16* csId = va_arg(args, s16*); s16* csId = va_arg(args, s16*);
BgSpot03Taki* taki = NULL;
switch (*csId) { switch (*csId) {
case 4180: case 4180:
case 4100: case 4100:
*should = false; *should = false;
RateLimitedSuccessChime(); 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; break;
default: default:
SPDLOG_INFO("VB_PLAY_ONEPOINT_CS {}", *csId); SPDLOG_INFO("VB_PLAY_ONEPOINT_CS {}", *csId);