From d0b4c6027d16fe8d022081bda1dac7d66c91a173 Mon Sep 17 00:00:00 2001 From: Cooliokid956 <68075390+Cooliokid956@users.noreply.github.com> Date: Mon, 2 Mar 2026 02:17:08 -0600 Subject: [PATCH] Restore proper squish death (#1127) --- src/game/mario_actions_cutscene.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/game/mario_actions_cutscene.c b/src/game/mario_actions_cutscene.c index 8d598b313..9162cd84a 100644 --- a/src/game/mario_actions_cutscene.c +++ b/src/game/mario_actions_cutscene.c @@ -1825,11 +1825,17 @@ s32 act_squished(struct MarioState *m) { if (m->actionTimer >= 15) { // 1 unit of health if (m->health < 0x0100) { - //level_trigger_warp(m, WARP_OP_DEATH); - // woosh, he's gone! - //set_mario_action(m, ACT_DISAPPEARED, 0); - drop_and_set_mario_action(m, ACT_DEATH_ON_BACK, 0); - m->squishTimer = 0; + bool allowDeath = true; + smlua_call_event_hooks(HOOK_ON_DEATH, m, &allowDeath); + if (!allowDeath) { return FALSE; } + + if (mario_can_bubble(m)) { + mario_set_bubbled(m); + } else { + level_trigger_warp(m, WARP_OP_DEATH); + // woosh, he's gone! + set_mario_action(m, ACT_DISAPPEARED, 0); + } } else if (m->hurtCounter == 0) { // un-squish animation m->squishTimer = 30;