From 5d2b794c004a118582c95004cf6cce33d021dd1f Mon Sep 17 00:00:00 2001 From: aMannus Date: Mon, 5 Dec 2022 01:27:15 +0100 Subject: [PATCH] Fix hookshot retraction on dpad (#2065) --- soh/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/soh/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c b/soh/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c index 3b5cc77ec..b4b761d48 100644 --- a/soh/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/soh/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -257,6 +257,10 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) { sp60.x = this->unk_1F4.x - (this->unk_1E8.x - this->unk_1F4.x); sp60.y = this->unk_1F4.y - (this->unk_1E8.y - this->unk_1F4.y); sp60.z = this->unk_1F4.z - (this->unk_1E8.z - this->unk_1F4.z); + u16 buttonsToCheck = BTN_A | BTN_B | BTN_R | BTN_CUP | BTN_CLEFT | BTN_CRIGHT | BTN_CDOWN; + if (CVar_GetS32("gDpadEquips", 0) != 0) { + buttonsToCheck |= BTN_DUP | BTN_DDOWN | BTN_DLEFT | BTN_DRIGHT; + } if (BgCheck_EntityLineTest1(&play->colCtx, &sp60, &this->unk_1E8, &sp78, &poly, true, true, true, true, &bgId) && !func_8002F9EC(play, &this->actor, poly, bgId, &sp78)) { @@ -281,8 +285,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) { Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_REFLECT, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8); } - } else if (CHECK_BTN_ANY(play->state.input[0].press.button, - (BTN_A | BTN_B | BTN_R | BTN_CUP | BTN_CLEFT | BTN_CRIGHT | BTN_CDOWN))) { + } else if (CHECK_BTN_ANY(play->state.input[0].press.button, (buttonsToCheck))) { this->timer = 0; } }