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 bf55c2da35
commit da79a14cec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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