diff options
| author | Christopher Leggett <chris@leggett.dev> | 2022-10-20 18:14:20 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-20 18:14:20 -0400 |
| commit | c60ad115cd1768de618070a744a0f85ac9a94975 (patch) | |
| tree | 6fe277e0dd83e5f24c25a5b65557d1891638c8ed | |
| parent | 36b42635d623918d1e1d4aa9f5a7e813f6bd623a (diff) | |
Fixes equipment changes while in water. (#1814)
| -rw-r--r-- | soh/src/code/z_parameter.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index 02f9395f5..5329ea2df 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -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) { |
