Fix camera for bubble in water (#49)

When a player dies in water, the camera continues to use the camera for under water even when you exit the water with the bubble. This commit fixes the issue.
This commit is contained in:
Isaac 2022-03-30 13:04:01 +10:00 committed by GitHub
parent 3e9ceb53b4
commit 6fa9a0f3f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -927,6 +927,7 @@ static void bubbled_offset_visual(struct MarioState* m) {
}
s32 act_bubbled(struct MarioState* m) {
set_camera_mode(m->area->camera, CAMERA_MODE_FREE_ROAM, 1);
struct MarioState* targetMarioState = nearest_mario_state_to_object(m->marioObj);
struct Object* target = targetMarioState->marioObj;
int angleToPlayer = obj_angle_to_object(m->marioObj, target);