Skip to content

Vanilla bugfix, allow fishing with blank B#6826

Open
djevangelia wants to merge 6 commits into
HarbourMasters:developfrom
djevangelia:fishfix
Open

Vanilla bugfix, allow fishing with blank B#6826
djevangelia wants to merge 6 commits into
HarbourMasters:developfrom
djevangelia:fishfix

Conversation

@djevangelia

@djevangelia djevangelia commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Background
When fishing and other things that change the B button item, the game saves the previous B item gSaveContext.equips.buttonItems[0] as temp B, gSaveContext.buttonStatus[0]. However, this variable is also used as a flag for whether a button is enabled or disabled (dimmed), which is value 0xFF.

Normally when fishing, the sword/equip value is not 0xFF and gets saved as temp B so button B is regarded as enabled. Player_ProcessItemButtons sees that current item is ITEM_FISHING_POLE which is equipped to an enabled button, and lets player continue holding the pole and use it.

Blank B is value 0xFF. When starting fishing with blank B, 0xFF gets saved as temp B, which will be interpreted as the B button being disabled. This forces Player_ProcessItemButtons to change player item to none, because the held item is not equipped on a usable button (same system causes item putaway when entering water). Note that this is not dependent on swordless flag, it's only dependent on blank B.

Fix
Add check that if fishing and ITEM_FISHING_POLE is on B, do not unequip. On B press, set button item to ITEM_FISHING_POLE as Player_GetItemOnButton doesn't return gSaveContext.equips.buttonItems[0] but the macro B_BTN_ITEM, which returns 0xFF if gSaveContext.buttonStatus[0] is 0xFF.

I also checked the OoTR fix, and it is the same concept except the stop unequip is done earlier (before Player_ItemIsInUse) and Player_GetItemOnButton is modified to return ITEM_FISHING_POLE.

Demonstration of cause and fix: https://www.youtube.com/watch?v=GFjbs4zS4Cc
(made in decomp for the on-screen data)
Can be tested easily by going into Dev tools and setting player B item to none, gives blank B.

Note
I made this as always on just to submit it for now, so that others can decide what kind of setting it should be and review it.

Build Artifacts

@serprex

serprex commented Jun 28, 2026

Copy link
Copy Markdown
Member

this should only be enabled by default for rando, a fix should be added to enhancements menu to fix always

@djevangelia

Copy link
Copy Markdown
Contributor Author

How do I make a setting enabled by default for certain mode? I guess it would be one setting that can be toggled no matter mode?

@serprex

serprex commented Jun 28, 2026

Copy link
Copy Markdown
Member

|| IS_RANDO

@djevangelia

Copy link
Copy Markdown
Contributor Author

Ok, setting for normal, always on for rando. Added enhancement setting. Tested both normal and randomizer.

Comment thread soh/src/overlays/actors/ovl_player_actor/z_player.c Outdated
Comment thread soh/src/overlays/actors/ovl_player_actor/z_player.c Outdated
@djevangelia djevangelia requested a review from serprex July 1, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants