From 5b7dad1de21bdaad6abd2ad27d95f5465459f8fe Mon Sep 17 00:00:00 2001 From: briaguya Date: Tue, 7 Jun 2022 02:46:24 -0400 Subject: [PATCH] fast chests --- libultraship/libultraship/SohImGuiImpl.cpp | 2 ++ soh/src/overlays/actors/ovl_player_actor/z_player.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index f7b8d6b77..1b59bdfdd 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -864,6 +864,8 @@ namespace SohImGui { Tooltip("Allows equiping the tunic and boots to c-buttons"); EnhancementCheckbox("MM Bunny Hood", "gMMBunnyHood"); Tooltip("Wearing the Bunny Hood grants a speed increase like in Majora's Mask"); + EnhancementCheckbox("Fast Chests", "gFastChests"); + Tooltip("Kick open every chest"); EnhancementCheckbox("Better Owl", "gBetterOwl"); Tooltip("The default response to Kaepora Gaebora is always that you understood what he said"); EnhancementCheckbox("Disable Navi Call Audio", "gDisableNaviCallAudio"); 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 04c100354..ecf77cc2a 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -6181,6 +6181,9 @@ s32 func_8083E5A8(Player* this, GlobalContext* globalCtx) { if (this->getItemId != GI_NONE) { GetItemEntry* giEntry = &sGetItemTable[-this->getItemId - 1]; EnBox* chest = (EnBox*)interactedActor; + if(CVar_GetS32("gFastChests", 0) != 0) { + giEntry->gi = -1 * abs(giEntry->gi); + } if (giEntry->itemId != ITEM_NONE) { if (((Item_CheckObtainability(giEntry->itemId) == ITEM_NONE) && (giEntry->field & 0x40)) ||