From 24fd3f1cdd345129742e1535c239ee95aeac2703 Mon Sep 17 00:00:00 2001 From: PurpleHato Date: Wed, 11 May 2022 23:46:19 +0200 Subject: [PATCH 1/3] Fixed idle animations for Two Handed Items Nintendo messed up and used a 0 instead of a 1 which basically pulled the wrong animation to load. --- soh/src/overlays/actors/ovl_player_actor/z_player.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 49ad4e6e4..c37895322 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -6981,7 +6981,7 @@ void func_808409CC(GlobalContext* globalCtx, Player* this) { if (sp34 < 4) { if (((sp34 != 0) && (sp34 != 3)) || ((this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD) && ((sp34 == 3) || Player_GetSwordHeld(this)))) { - if ((sp34 == 0) && Player_HoldsTwoHandedWeapon(this)) { + if ((sp34 == 1) && Player_HoldsTwoHandedWeapon(this)) { sp34 = 4; } sp38 = sp34 + 9; From 2e84a351b1f2ae728d37a0e93dd5a6fd38153f17 Mon Sep 17 00:00:00 2001 From: PurpleHato Date: Thu, 12 May 2022 00:18:39 +0200 Subject: [PATCH 2/3] Used Cvars to make it part of the enhancements menu --- libultraship/libultraship/SohImGuiImpl.cpp | 1 + soh/soh/Enhancements/bootcommands.c | 1 + soh/src/overlays/actors/ovl_player_actor/z_player.c | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 785a29dee..042b30a7f 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -678,6 +678,7 @@ namespace SohImGui { ImGui::Separator(); EnhancementCheckbox("Fix L&R Pause menu", "gUniformLR"); EnhancementCheckbox("Fix Dungeon entrances", "gFixDungeonMinimapIcon"); + EnhancementCheckbox("Fix Two Handed idle animations", "gTwoHandedIdle"); EXPERIMENTAL(); diff --git a/soh/soh/Enhancements/bootcommands.c b/soh/soh/Enhancements/bootcommands.c index 03742dae9..4995b5248 100644 --- a/soh/soh/Enhancements/bootcommands.c +++ b/soh/soh/Enhancements/bootcommands.c @@ -27,6 +27,7 @@ void BootCommands_Init() CVar_RegisterS32("gMinimalUI", 0); CVar_RegisterS32("gRumbleEnabled", 0); CVar_RegisterS32("gUniformLR", 1); + CVar_RegisterS32("gTwoHandedIdle", 1); CVar_RegisterS32("gNewDrops", 0); CVar_RegisterS32("gVisualAgony", 0); CVar_RegisterS32("gLanguages", 0); //0 = English / 1 = German / 2 = French 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 c37895322..24ad28c4a 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -6981,7 +6981,7 @@ void func_808409CC(GlobalContext* globalCtx, Player* this) { if (sp34 < 4) { if (((sp34 != 0) && (sp34 != 3)) || ((this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD) && ((sp34 == 3) || Player_GetSwordHeld(this)))) { - if ((sp34 == 1) && Player_HoldsTwoHandedWeapon(this)) { + if ((sp34 == 1) && Player_HoldsTwoHandedWeapon(this) && CVar_GetS32("gTwoHandedIdle", 1) == 1) { sp34 = 4; } sp38 = sp34 + 9; From 2478ed86eb65330f3c326f3be7e96be69ea3c6f9 Mon Sep 17 00:00:00 2001 From: PurpleHato Date: Thu, 12 May 2022 15:39:57 +0200 Subject: [PATCH 3/3] Tweak: Don't make the fix enabled by default --- soh/soh/Enhancements/bootcommands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/soh/Enhancements/bootcommands.c b/soh/soh/Enhancements/bootcommands.c index 4995b5248..71bd00cac 100644 --- a/soh/soh/Enhancements/bootcommands.c +++ b/soh/soh/Enhancements/bootcommands.c @@ -27,7 +27,7 @@ void BootCommands_Init() CVar_RegisterS32("gMinimalUI", 0); CVar_RegisterS32("gRumbleEnabled", 0); CVar_RegisterS32("gUniformLR", 1); - CVar_RegisterS32("gTwoHandedIdle", 1); + CVar_RegisterS32("gTwoHandedIdle", 0); CVar_RegisterS32("gNewDrops", 0); CVar_RegisterS32("gVisualAgony", 0); CVar_RegisterS32("gLanguages", 0); //0 = English / 1 = German / 2 = French