From 2a5f52886362d7f7ef0f1ad0bc769a94fd1e91eb Mon Sep 17 00:00:00 2001 From: Patrick12115 Date: Thu, 19 Sep 2024 20:47:32 -0400 Subject: [PATCH] Pedestal Cutscene --- soh/soh/Enhancements/mods.cpp | 5 ++++- soh/src/overlays/actors/ovl_player_actor/z_player.c | 10 +++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/soh/soh/Enhancements/mods.cpp b/soh/soh/Enhancements/mods.cpp index 7643da74d..7c6f6b94c 100644 --- a/soh/soh/Enhancements/mods.cpp +++ b/soh/soh/Enhancements/mods.cpp @@ -719,7 +719,10 @@ void RegisterMirrorModeHandler() { void RegisterPatchNoMSHandler() { GameInteractor::Instance->RegisterGameHook([]() { - if (CVarGetInteger("gRandomizeShuffleMasterSword", 0) && (gSaveContext.equips.buttonItems[0] == ITEM_NONE)) { + if (OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_MASTER_SWORD) && + (gSaveContext.equips.buttonItems[0] != ITEM_SWORD_MASTER && + gSaveContext.equips.buttonItems[0] != ITEM_SWORD_BGS && + gSaveContext.equips.buttonItems[0] != ITEM_SWORD_BROKEN)) { for (int i = 43; i <= 46; i++) { std::string patchName = "adultNoMS." + std::to_string(1) + "." + std::to_string(i); ResourceMgr_PatchGfxByName(gLinkAdultHylianShieldSwordAndSheathFarDL, patchName.c_str(), i, gsDPNoOp()); diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index 1ef4fa593..969dc61da 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -6881,7 +6881,8 @@ s32 Player_ActionChange_2(Player* this, PlayState* play) { } if ((this->heldActor == NULL) || Player_HoldsHookshot(this)) { - if ((interactedActor->id == ACTOR_BG_TOKI_SWD) && LINK_IS_ADULT) { + if ((interactedActor->id == ACTOR_BG_TOKI_SWD) && LINK_IS_ADULT && + !(Randomizer_GetSettingValue(RSK_SHUFFLE_MASTER_SWORD && !CHECK_OWNED_EQUIP(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_MASTER)))) { s32 sp24 = this->itemAction; this->itemAction = PLAYER_IA_NONE; @@ -10258,6 +10259,13 @@ void Player_Init(Actor* thisx, PlayState* play2) { } } + if (initMode == 1 && IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MASTER_SWORD) && + !CHECK_OWNED_EQUIP(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_MASTER)) { + Math_Vec3f_Copy(&this->actor.world.pos, &D_808546F4); + this->yaw = this->actor.shape.rot.y = -0x8000; + initMode = 13; + } + D_80854738[initMode](play, this); if (initMode != 0) {