Restore proper squish death (#1127)
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows-opengl (push) Waiting to run
Build coop / build-windows-directx (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run

This commit is contained in:
Cooliokid956 2026-03-02 02:17:08 -06:00 committed by GitHub
parent a9f0b5c99c
commit d0b4c6027d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;