From d935028a545f977a8b6ed0b846f63e12def74338 Mon Sep 17 00:00:00 2001 From: Patrick12115 <115201185+Patrick12115@users.noreply.github.com> Date: Sun, 13 Oct 2024 20:33:34 -0400 Subject: [PATCH] [Fixes] Fix left hand when holding Hammer (#3992) * Fixin it * PreFIX * Added Prefix to wrong Cvar Oops --- soh/soh/Enhancements/mods.cpp | 7 +++++++ soh/soh/SohMenuBar.cpp | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/soh/soh/Enhancements/mods.cpp b/soh/soh/Enhancements/mods.cpp index adac0d968..3bdb1e826 100644 --- a/soh/soh/Enhancements/mods.cpp +++ b/soh/soh/Enhancements/mods.cpp @@ -768,6 +768,13 @@ void UpdatePatchHand() { ResourceMgr_UnpatchGfxByName(gLinkChildLeftFistAndBoomerangNearDL, "adultBoomerang"); ResourceMgr_UnpatchGfxByName(gLinkChildRightFistAndDekuShieldNearDL, "adultDekuShield"); } + if (CVarGetInteger("gEnhancements.FixHammerHand", 0) && LINK_IS_ADULT) { + ResourceMgr_PatchGfxByName(gLinkAdultLeftHandHoldingHammerNearDL, "hammerHand1", 92, gsSPDisplayListOTRFilePath(gLinkAdultLeftHandClosedNearDL)); + ResourceMgr_PatchGfxByName(gLinkAdultLeftHandHoldingHammerNearDL, "hammerHand2", 93, gsSPEndDisplayList()); + } else { + ResourceMgr_UnpatchGfxByName(gLinkAdultLeftHandHoldingHammerNearDL, "hammerHand1"); + ResourceMgr_UnpatchGfxByName(gLinkAdultLeftHandHoldingHammerNearDL, "hammerHand2"); + } } void RegisterPatchHandHandler() { diff --git a/soh/soh/SohMenuBar.cpp b/soh/soh/SohMenuBar.cpp index b75708209..d30626fae 100644 --- a/soh/soh/SohMenuBar.cpp +++ b/soh/soh/SohMenuBar.cpp @@ -1414,6 +1414,10 @@ void DrawEnhancementsMenu() { "This will lower them, making activating them easier"); UIWidgets::PaddedEnhancementCheckbox("Fix Zora hint dialogue", CVAR_ENHANCEMENT("FixZoraHintDialogue"), true, false); UIWidgets::Tooltip("Fixes one Zora's dialogue giving a hint about bringing Ruto's Letter to King Zora to properly occur before moving King Zora rather than after"); + if (UIWidgets::PaddedEnhancementCheckbox("Fix hand holding Hammer", "gEnhancements.FixHammerHand", true, false)) { + UpdatePatchHand(); + } + UIWidgets::Tooltip("Fixes Adult Link have a backwards left hand when holding the Megaton Hammer."); ImGui::EndMenu(); }