diff options
| author | Garrett Cox <garrettjcox@gmail.com> | 2026-02-24 12:54:52 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-24 12:54:52 -0600 |
| commit | 3f19fb9bc041cc1f2dc5e732b2c5c67e6f60e95d (patch) | |
| tree | bfd3a6bfb72976232070f7d49266367d68cf646f | |
| parent | e9aab9a2899e8b0e3cc209f1b7add921704e63b0 (diff) | |
Make ArrowCycle only available while arrow is knocked, consistent with MMR (#1568)
| -rw-r--r-- | mm/2s2h/Enhancements/Equipment/ArrowCycle.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/mm/2s2h/Enhancements/Equipment/ArrowCycle.cpp b/mm/2s2h/Enhancements/Equipment/ArrowCycle.cpp index 1bae348ce..0be581202 100644 --- a/mm/2s2h/Enhancements/Equipment/ArrowCycle.cpp +++ b/mm/2s2h/Enhancements/Equipment/ArrowCycle.cpp @@ -258,19 +258,17 @@ void ArrowCycleMain() { return; } - if (IsAimingBow(player) && CHECK_BTN_ANY(input->press.button, BTN_R)) { + if (IsAimingBow(player) && CHECK_BTN_ANY(input->press.button, BTN_R) && player->heldActor != NULL && + player->heldActor->id == ACTOR_EN_ARROW) { if (IsHoldingMagicBow(player) && gSaveContext.magicState != MAGIC_STATE_IDLE && player->heldActor == NULL) { Audio_PlaySfx(NA_SE_SY_ERROR); return; } + EnArrow* heldArrow = (EnArrow*)player->heldActor; - if (player->heldActor != NULL && player->heldActor->id == ACTOR_EN_ARROW) { - EnArrow* heldArrow = (EnArrow*)player->heldActor; - - // If the held arrow itself is magical, then we should "restore" the consumed magic upon cycling - if (ARROW_IS_MAGICAL(heldArrow->actor.params)) { - Magic_Add(gPlayState, sMagicArrowCosts[ARROW_GET_MAGIC_FROM_TYPE(heldArrow->actor.params)]); - } + // If the held arrow itself is magical, then we should "restore" the consumed magic upon cycling + if (ARROW_IS_MAGICAL(heldArrow->actor.params)) { + Magic_Add(gPlayState, sMagicArrowCosts[ARROW_GET_MAGIC_FROM_TYPE(heldArrow->actor.params)]); } CycleToNextArrow(gPlayState, player); @@ -300,7 +298,8 @@ void RegisterArrowCycle() { Input* input = CONTROLLER1(&gPlayState->state); // Suppress Shield input first person cancel when aiming the bow - if (IsAimingBow(player) && CHECK_BTN_ANY(input->cur.button, BTN_R)) { + if (IsAimingBow(player) && CHECK_BTN_ANY(input->cur.button, BTN_R) && player->heldActor != NULL && + player->heldActor->id == ACTOR_EN_ARROW) { *should = false; } } |
