summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Longstaff <JordanLongstaff@users.noreply.github.com>2026-01-16 08:55:36 -0500
committerGitHub <noreply@github.com>2026-01-16 13:55:36 +0000
commit6606eefbf1c52aa4b950aa6f205dffc8d417c720 (patch)
tree916175bf0ccdc4042b6b01c703dbc8cedec96349
parent6e4c010ffe2bca36b3534875699781f86872343d (diff)
Add option to disable Link spinning with the Goron Pot (#6138)
Make Link focus on Goron Pot instead
-rw-r--r--soh/soh/Enhancements/Graphics/DisableLinkSpinWithGoronPot.cpp29
-rw-r--r--soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h8
-rw-r--r--soh/soh/SohGui/SohMenuEnhancements.cpp4
-rw-r--r--soh/src/code/z_onepointdemo.c4
4 files changed, 44 insertions, 1 deletions
diff --git a/soh/soh/Enhancements/Graphics/DisableLinkSpinWithGoronPot.cpp b/soh/soh/Enhancements/Graphics/DisableLinkSpinWithGoronPot.cpp
new file mode 100644
index 000000000..c6fcbf913
--- /dev/null
+++ b/soh/soh/Enhancements/Graphics/DisableLinkSpinWithGoronPot.cpp
@@ -0,0 +1,29 @@
+#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
+#include "soh/ShipInit.hpp"
+
+extern "C" {
+#include "functions.h"
+#include "src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.h"
+extern PlayState* gPlayState;
+}
+
+static constexpr int32_t CVAR_LINK_SPIN_DISABLE_DEFAULT = 0;
+#define CVAR_LINK_SPIN_DISABLE_NAME CVAR_ENHANCEMENT("DisableLinkSpinWithGoronPot")
+#define CVAR_LINK_SPIN_DISABLE_VALUE CVarGetInteger(CVAR_LINK_SPIN_DISABLE_NAME, CVAR_LINK_SPIN_DISABLE_DEFAULT)
+
+static void MakeLinkFocusOnPot() {
+ BgSpot18Basket* bgSpot18 =
+ (BgSpot18Basket*)Actor_Find(&gPlayState->actorCtx, ACTOR_BG_SPOT18_BASKET, ACTORCAT_PROP);
+ if (bgSpot18 != NULL) {
+ func_8002DF38(gPlayState, &bgSpot18->dyna.actor, 1);
+ }
+}
+
+static void RegisterDisableLinkSpinWithGoronPot() {
+ COND_VB_SHOULD(VB_LINK_SPIN_WITH_GORON_POT, CVAR_LINK_SPIN_DISABLE_VALUE, {
+ MakeLinkFocusOnPot();
+ *should = false;
+ });
+}
+
+static RegisterShipInitFunc initFunc(RegisterDisableLinkSpinWithGoronPot, { CVAR_LINK_SPIN_DISABLE_NAME });
diff --git a/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h b/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h
index 311779e2c..c16fb6fc8 100644
--- a/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h
+++ b/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h
@@ -1340,6 +1340,14 @@ typedef enum {
// #### `result`
// ```c
+ // true
+ // ```
+ // #### `args`
+ // - None
+ VB_LINK_SPIN_WITH_GORON_POT,
+
+ // #### `result`
+ // ```c
// !Flags_GetSwitch(play, this->dyna.actor.params & 0x3F)
// ```
// #### `args`
diff --git a/soh/soh/SohGui/SohMenuEnhancements.cpp b/soh/soh/SohGui/SohMenuEnhancements.cpp
index 017676b7c..e913bf8ef 100644
--- a/soh/soh/SohGui/SohMenuEnhancements.cpp
+++ b/soh/soh/SohGui/SohMenuEnhancements.cpp
@@ -695,6 +695,10 @@ void SohMenu::AddMenuEnhancements() {
.CVar(CVAR_ENHANCEMENT("RemoveSpinAttackDarkness"))
.RaceDisable(false)
.Options(CheckboxOptions().Tooltip("Remove the Darkness that appears when charging a Spin Attack."));
+ AddWidget(path, "Disable Link Spinning With Goron Pot", WIDGET_CVAR_CHECKBOX)
+ .CVar(CVAR_ENHANCEMENT("DisableLinkSpinWithGoronPot"))
+ .RaceDisable(false)
+ .Options(CheckboxOptions().Tooltip("Link will not spin when the Goron Pot starts to spin."));
AddWidget(path, "Draw Distance", WIDGET_SEPARATOR_TEXT).RaceDisable(false);
AddWidget(path, "Increase Actor Draw Distance: %dx", WIDGET_CVAR_SLIDER_INT)
.CVar(CVAR_ENHANCEMENT("DisableDrawDistance"))
diff --git a/soh/src/code/z_onepointdemo.c b/soh/src/code/z_onepointdemo.c
index c68f1b522..c3c2c2e76 100644
--- a/soh/src/code/z_onepointdemo.c
+++ b/soh/src/code/z_onepointdemo.c
@@ -883,7 +883,9 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
csInfo->keyFrameCnt = 1;
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
- func_8002DF38(play, &player->actor, 1);
+ if (GameInteractor_Should(VB_LINK_SPIN_WITH_GORON_POT, true)) {
+ func_8002DF38(play, &player->actor, 1);
+ }
i = Quake_Add(csCam, 3);
Quake_SetSpeed(i, 12000);