From d07818b6f13bc1971f96c27eff2183b0c57fee5e Mon Sep 17 00:00:00 2001 From: Cooliokid956 <68075390+Cooliokid956@users.noreply.github.com> Date: Thu, 4 Jun 2026 02:48:33 -0500 Subject: [PATCH] oop add delay to bubble exit TODO: solve extra life loss --- src/game/mario.c | 1 - src/game/mario.h | 1 - src/game/mario_actions_automatic.c | 9 +++++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/game/mario.c b/src/game/mario.c index b4f17a17f..ac01969fe 100644 --- a/src/game/mario.c +++ b/src/game/mario.c @@ -2207,7 +2207,6 @@ void init_single_mario(struct MarioState* m) { u16 playerIndex = m->playerIndex; struct SpawnInfo* spawnInfo = &gPlayerSpawnInfos[playerIndex]; - unused80339F10 = 0; m->freeze = 0; diff --git a/src/game/mario.h b/src/game/mario.h index 897178043..558baaee0 100644 --- a/src/game/mario.h +++ b/src/game/mario.h @@ -6,7 +6,6 @@ #include "macros.h" #include "types.h" -extern u16 gLocalBubbleCounter; struct WallCollisionData; /* |description| diff --git a/src/game/mario_actions_automatic.c b/src/game/mario_actions_automatic.c index b8b76fa1f..4ac9cb242 100644 --- a/src/game/mario_actions_automatic.c +++ b/src/game/mario_actions_automatic.c @@ -1064,7 +1064,7 @@ s32 act_bubbled(struct MarioState* m) { s32 pitchToPlayer = obj_pitch_to_object(m->marioObj, target); s32 distanceToPlayer = dist_between_objects(m->marioObj, target); - // trigger warp if all are bubbled + // trigger warp if all are bubbled long enough if (m->playerIndex == 0) { u8 allInBubble = TRUE; for (s32 i = 0; i < MAX_PLAYERS; i++) { @@ -1076,9 +1076,10 @@ s32 act_bubbled(struct MarioState* m) { } } if (allInBubble) { - level_trigger_warp(m, WARP_OP_DEATH); - return FALSE; - } + if (m->actionState++ == 60) { + level_trigger_warp(m, WARP_OP_DEATH); + } + } else { m->actionState = 0; } } // create bubble