Disable Lens Effect On Unequip (#4432)

* Add logic to turn off lens effect when replacing it on a button with another item, but not swapping.

* Swap to real fix for dpad equips bug, c/o Rozelette.
This commit is contained in:
Malkierian
2024-10-17 14:36:53 -07:00
committed by GitHub
parent b5c6545d6f
commit dba74f8805

View File

@@ -3692,7 +3692,7 @@ void Interface_UpdateMagicBar(PlayState* play) {
(msgCtx->msgMode == MSGMODE_NONE) && (play->gameOverCtx.state == GAMEOVER_INACTIVE) &&
(play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->transitionMode == TRANS_MODE_OFF) && !Play_InCsMode(play)) {
bool hasLens = false;
for (int buttonIndex = 1; buttonIndex < (CVarGetInteger(CVAR_ENHANCEMENT("DpadEquips"), 0) != 0) ? ARRAY_COUNT(gSaveContext.equips.buttonItems) : 4;
for (int buttonIndex = 1; buttonIndex < ((CVarGetInteger(CVAR_ENHANCEMENT("DpadEquips"), 0) != 0) ? ARRAY_COUNT(gSaveContext.equips.buttonItems) : 4);
buttonIndex++) {
if (gSaveContext.equips.buttonItems[buttonIndex] == ITEM_LENS) {
hasLens = true;