From 42d1d681a602e386376a038b7699901184c05b8f Mon Sep 17 00:00:00 2001 From: MysterD Date: Sat, 19 Sep 2020 10:20:46 -0700 Subject: [PATCH] Fix bubbled vanilla-camera behavior Fixes #66 --- src/game/mario.c | 4 ++++ src/game/mario_actions_automatic.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/game/mario.c b/src/game/mario.c index d6071037..126882c1 100644 --- a/src/game/mario.c +++ b/src/game/mario.c @@ -399,6 +399,10 @@ void mario_set_bubbled(struct MarioState* m) { m->statusForCamera->cameraEvent = 0; extern s16 gCutsceneTimer; gCutsceneTimer = 0; + + if (m->playerIndex == 0) { + set_camera_mode(m->area->camera, m->area->camera->defMode, 1); + } } /** diff --git a/src/game/mario_actions_automatic.c b/src/game/mario_actions_automatic.c index e224667c..dd650564 100644 --- a/src/game/mario_actions_automatic.c +++ b/src/game/mario_actions_automatic.c @@ -951,6 +951,9 @@ s32 act_bubbled(struct MarioState* m) { m->vel[1] = 0; m->vel[2] = 0; m->marioObj->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE; + if (m->playerIndex == 0) { + set_camera_mode(m->area->camera, m->area->camera->defMode, 1); + } return force_idle_state(m); }