Fix skipping Adult Ruto one-point cutscene (#4519)

* Fix skipping Adult Ruto one-point cutscene

* Kill Ruto's actor instead of leaving her to swim up

* Change to Story cutscene

* Change to extern function
This commit is contained in:
Jordan Longstaff 2024-11-06 21:38:44 -05:00 committed by GitHub
parent dabd0c25bd
commit a919b6a5a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,6 +14,7 @@ extern "C" {
#include "src/overlays/actors/ovl_En_Owl/z_en_owl.h"
#include "src/overlays/actors/ovl_En_Ko/z_en_ko.h"
#include "src/overlays/actors/ovl_En_Ma1/z_en_ma1.h"
#include "src/overlays/actors/ovl_En_Ru2/z_en_ru2.h"
#include "src/overlays/actors/ovl_En_Zl4/z_en_zl4.h"
#include "src/overlays/actors/ovl_En_Box/z_en_box.h"
#include "src/overlays/actors/ovl_Demo_Im/z_demo_im.h"
@ -33,6 +34,8 @@ extern "C" {
extern SaveContext gSaveContext;
extern PlayState* gPlayState;
extern int32_t D_8011D3AC;
extern void func_80AF36EC(EnRu2* enRu2, PlayState* play);
}
#define RAND_GET_OPTION(option) Rando::Context::GetInstance()->GetOption(option).GetSelectedOptionIndex()
@ -813,6 +816,15 @@ void TimeSaverOnActorInitHandler(void* actorRef) {
Actor_Kill(actor);
}
}
// Water Temple Ruto cutscene
if (actor->id == ACTOR_EN_RU2 && gPlayState->sceneNum == SCENE_WATER_TEMPLE) {
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Story"), IS_RANDO)) {
EnRu2* enRu2 = (EnRu2*)actor;
func_80AF36EC(enRu2, gPlayState);
Actor_Kill(actor);
}
}
}
void TimeSaverOnSceneInitHandler(int16_t sceneNum) {