From f4b08ddf52b58bfbf12b68a21c4ba7baf1b9fb3e Mon Sep 17 00:00:00 2001 From: Agent X <44549182+Agent-11@users.noreply.github.com> Date: Mon, 30 Oct 2023 17:37:20 -0400 Subject: [PATCH] Revert new pressed_pause behavior --- src/game/level_update.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/game/level_update.c b/src/game/level_update.c index d92cef65f..4aad778c3 100644 --- a/src/game/level_update.c +++ b/src/game/level_update.c @@ -263,10 +263,19 @@ u32 pressed_pause(void) { } } - if (get_dialog_id() < 0) { - return gPlayer1Controller->buttonPressed & START_BUTTON; + u32 val4 = get_dialog_id() >= 0; + u32 intangible = (gMarioState->action & ACT_FLAG_INTANGIBLE) != 0; + + if (!intangible && !val4 && !gWarpTransition.isActive && sDelayedWarpOp == WARP_OP_NONE + && (gPlayer1Controller->buttonPressed & START_BUTTON)) { + return TRUE; } + // I don't agree with this official change, mods use ACT_FLAG_INTANGIBLE to prevent the player from pausing in things like cutscenes + // if (get_dialog_id() < 0) { + // return gPlayer1Controller->buttonPressed & START_BUTTON; + // } + return FALSE; }