diff options
| author | A Green Spoon <121978037+A-Green-Spoon@users.noreply.github.com> | 2026-04-17 08:50:55 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-16 23:50:55 +0000 |
| commit | 412b60a02f366d9e3ac4e3bf73da07991a33ba6d (patch) | |
| tree | eea5cb9f442d878d3c0ad25cd97c44322a333e06 | |
| parent | 1876435e9823309da9a55ac26ec092d1915aabc0 (diff) | |
Fix Duplicate Reticles in Anchor (#6520)
| -rw-r--r-- | soh/soh/Enhancements/Items/AdditionalReticles.cpp | 2 | ||||
| -rw-r--r-- | soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h | 5 | ||||
| -rw-r--r-- | soh/src/code/z_player_lib.c | 6 |
3 files changed, 8 insertions, 5 deletions
diff --git a/soh/soh/Enhancements/Items/AdditionalReticles.cpp b/soh/soh/Enhancements/Items/AdditionalReticles.cpp index 2cb3b975a..9b8b5cfca 100644 --- a/soh/soh/Enhancements/Items/AdditionalReticles.cpp +++ b/soh/soh/Enhancements/Items/AdditionalReticles.cpp @@ -36,7 +36,7 @@ void RegisterAdditionalReticles() { bool shouldRegister = CVAR_BOW_RETICLE_VALUE || CVAR_BOOMERANG_RETICLE_VALUE; COND_VB_SHOULD(VB_DRAW_ADDITIONAL_RETICLES, shouldRegister, { - Player* player = GET_PLAYER(gPlayState); + Player* player = va_arg(args, Player*); Actor* heldActor = player->heldActor; if (CVAR_BOW_RETICLE_VALUE && ((player->heldItemAction >= PLAYER_IA_BOW && player->heldItemAction <= PLAYER_IA_BOW_LIGHT) || diff --git a/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h b/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h index 4e13fdf33..09ce04580 100644 --- a/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h +++ b/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h @@ -540,10 +540,11 @@ typedef enum { // #### `result` // ```c - // true + // (this->heldItemAction == PLAYER_IA_HOOKSHOT) || + // (this->heldItemAction == PLAYER_IA_LONGSHOT) // ``` // #### `args` - // - None + // - '*Player' VB_DRAW_ADDITIONAL_RETICLES, // #### `result` diff --git a/soh/src/code/z_player_lib.c b/soh/src/code/z_player_lib.c index 34750ed2c..83dfd7608 100644 --- a/soh/src/code/z_player_lib.c +++ b/soh/src/code/z_player_lib.c @@ -1906,8 +1906,10 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve } if (this->actor.scale.y >= 0.0f) { - if (GameInteractor_Should(VB_DRAW_ADDITIONAL_RETICLES, (this->heldItemAction == PLAYER_IA_HOOKSHOT) || - (this->heldItemAction == PLAYER_IA_LONGSHOT))) { + if (GameInteractor_Should(VB_DRAW_ADDITIONAL_RETICLES, + (this->heldItemAction == PLAYER_IA_HOOKSHOT) || + (this->heldItemAction == PLAYER_IA_LONGSHOT), + this)) { Matrix_MultVec3f(&D_80126184, &this->unk_3C8); if (heldActor != NULL) { |
