Skip to content

Commit

Permalink
Fixes equipment changes while in water. (#1814)
Browse files Browse the repository at this point in the history
  • Loading branch information
leggettc18 authored Oct 20, 2022
1 parent 36b4263 commit c60ad11
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion soh/src/code/z_parameter.c
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,15 @@ void func_80083108(GlobalContext* globalCtx) {
gSaveContext.buttonStatus[0] = BTN_DISABLED;

for (i = 1; i < ARRAY_COUNT(gSaveContext.equips.buttonItems); i++) {
if (func_8008F2F8(globalCtx) == 2) {
if ((gSaveContext.equips.buttonItems[i] >= ITEM_SHIELD_DEKU) &&
(gSaveContext.equips.buttonItems[i] <= ITEM_BOOTS_HOVER)) {
// Equipment on c-buttons is always enabled
if (gSaveContext.buttonStatus[BUTTON_STATUS_INDEX(i)] == BTN_DISABLED) {
sp28 = 1;
}

gSaveContext.buttonStatus[BUTTON_STATUS_INDEX(i)] = BTN_ENABLED;
} else if (func_8008F2F8(globalCtx) == 2) {
if ((gSaveContext.equips.buttonItems[i] != ITEM_HOOKSHOT) &&
(gSaveContext.equips.buttonItems[i] != ITEM_LONGSHOT)) {
if (gSaveContext.buttonStatus[BUTTON_STATUS_INDEX(i)] == BTN_ENABLED) {
Expand Down

0 comments on commit c60ad11

Please sign in to comment.