fix dark link softlock (#5027)

This commit is contained in:
briaguya 2025-02-09 08:49:56 -08:00 committed by GitHub
parent 0177690b54
commit 29cecd8502
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 3 deletions

View File

@ -94,10 +94,19 @@ void RegisterAssignableTunicsBoots() {
return;
}
Input* input = va_arg(args, Input*);
Player* player = GET_PLAYER(gPlayState);
Player* player = va_arg(args, Player*);
// if we're not dealing with the actual player, we're probably
// dealing with dark link, don't do any tunics/boots stuff, just
// run the vanilla action func
if (player->actor.id != ACTOR_PLAYER) {
return;
}
*should = false;
Input* input = va_arg(args, Input*);
player->actionFunc(player, gPlayState);
UseTunicBoots(player, gPlayState, input);
});

View File

@ -398,6 +398,7 @@ typedef enum {
// !(this->stateFlags3 & PLAYER_STATE3_PAUSE_ACTION_FUNC)
// ```
// #### `args`
// - `*Player`
// - `*Input`
VB_EXECUTE_PLAYER_ACTION_FUNC,

View File

@ -12166,7 +12166,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
sUseHeldItem = sHeldItemButtonIsHeldDown = 0;
sSavedCurrentMask = this->currentMask;
if (GameInteractor_Should(VB_EXECUTE_PLAYER_ACTION_FUNC, !(this->stateFlags3 & PLAYER_STATE3_PAUSE_ACTION_FUNC), input)) {
if (GameInteractor_Should(VB_EXECUTE_PLAYER_ACTION_FUNC, !(this->stateFlags3 & PLAYER_STATE3_PAUSE_ACTION_FUNC), this, input)) {
this->actionFunc(this, play);
}