Check if in water before changing camera. (#71)

This commit is contained in:
Isaac 2022-04-28 11:34:31 +10:00 committed by GitHub
parent 3c38c276c9
commit b45e8e7e58
1 changed files with 1 additions and 1 deletions

View File

@ -929,7 +929,7 @@ static void bubbled_offset_visual(struct MarioState* m) {
} }
s32 act_bubbled(struct MarioState* m) { s32 act_bubbled(struct MarioState* m) {
if (m->playerIndex == 0) { if (m->playerIndex == 0 && m->area->camera->mode == CAMERA_MODE_WATER_SURFACE) {
set_camera_mode(m->area->camera, CAMERA_MODE_FREE_ROAM, 1); set_camera_mode(m->area->camera, CAMERA_MODE_FREE_ROAM, 1);
} }
struct MarioState* targetMarioState = nearest_mario_state_to_object(m->marioObj); struct MarioState* targetMarioState = nearest_mario_state_to_object(m->marioObj);