diff --git a/mm/src/overlays/actors/ovl_Boss_06/z_boss_06.c b/mm/src/overlays/actors/ovl_Boss_06/z_boss_06.c index 227cdefdf..d7994edd3 100644 --- a/mm/src/overlays/actors/ovl_Boss_06/z_boss_06.c +++ b/mm/src/overlays/actors/ovl_Boss_06/z_boss_06.c @@ -183,11 +183,13 @@ void func_809F23CC(Boss06* this) { } void func_809F24A8(Boss06* this) { - if (GameInteractor_Should(VB_ENEMY_CUTSCENE_ACTION, true, this)) { - this->actionFunc = func_809F24C8; - this->unk_A28 = 0.0f; - this->unk_1AC = 0.0f; + if (!GameInteractor_Should(VB_ENEMY_CUTSCENE_ACTION, true, this)) { + return; } + + this->actionFunc = func_809F24C8; + this->unk_A28 = 0.0f; + this->unk_1AC = 0.0f; } void func_809F24C8(Boss06* this, PlayState* play) { diff --git a/mm/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c b/mm/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c index 84f712e3f..dbd8c0cf7 100644 --- a/mm/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c +++ b/mm/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c @@ -820,18 +820,20 @@ void EnBigslime_JerkCameraPlayerHit(EnBigslime* this, PlayState* play) { * then zooms into the Gekko until the Gekko calls the minislimes down from the ceiling */ void EnBigslime_UpdateCameraIntroCs(EnBigslime* this, PlayState* play, s32 noticeTimer) { - if (GameInteractor_Should(VB_ENEMY_CUTSCENE_ACTION, true, this)) { - Camera* subCam = Play_GetCamera(play, this->subCamId); - Vec3f subCamEye; - f32 zoom = (noticeTimer * 19.0f) + 67.0f; - s16 yawOffset = this->actor.yawTowardsPlayer + (noticeTimer * 0x31); + if (!GameInteractor_Should(VB_ENEMY_CUTSCENE_ACTION, true, this)) { + return; + } - subCamEye.x = Math_SinS(yawOffset) * zoom + subCam->at.x; - subCamEye.z = Math_CosS(yawOffset) * zoom + subCam->at.z; - subCamEye.y = subCam->at.y + -4.0f + (noticeTimer * 2.0f); + Camera* subCam = Play_GetCamera(play, this->subCamId); + Vec3f subCamEye; + f32 zoom = (noticeTimer * 19.0f) + 67.0f; + s16 yawOffset = this->actor.yawTowardsPlayer + (noticeTimer * 0x31); - Play_SetCameraAtEye(play, this->subCamId, &subCam->at, &subCamEye); - } + subCamEye.x = Math_SinS(yawOffset) * zoom + subCam->at.x; + subCamEye.z = Math_CosS(yawOffset) * zoom + subCam->at.z; + subCamEye.y = subCam->at.y + -4.0f + (noticeTimer * 2.0f); + + Play_SetCameraAtEye(play, this->subCamId, &subCam->at, &subCamEye); } /** @@ -839,9 +841,11 @@ void EnBigslime_UpdateCameraIntroCs(EnBigslime* this, PlayState* play, s32 notic * center of the roof. This is used when the minislimes merges into bigslime. */ void EnBigslime_UpdateCameraFormingBigslime(EnBigslime* this, PlayState* play) { - if (GameInteractor_Should(VB_ENEMY_CUTSCENE_ACTION, true, this)) { - Play_SetCameraAtEye(play, this->subCamId, &this->actor.focus.pos, &Play_GetCamera(play, this->subCamId)->eye); + if (!GameInteractor_Should(VB_ENEMY_CUTSCENE_ACTION, true, this)) { + return; } + + Play_SetCameraAtEye(play, this->subCamId, &this->actor.focus.pos, &Play_GetCamera(play, this->subCamId)->eye); } void EnBigslime_EndCutscene(EnBigslime* this, PlayState* play) { @@ -2377,13 +2381,15 @@ void EnBigslime_CutsceneDefeat(EnBigslime* this, PlayState* play) { EnBigslime_SetupGekkoDespawn(this, play); } else { // Continue for the camera to follow Gekko as it spins in defeat - if (GameInteractor_Should(VB_ENEMY_CUTSCENE_ACTION, true, this)) { - subCam = Play_GetCamera(play, this->subCamId); - subCamAt.x = this->actor.world.pos.x; - subCamAt.y = this->actor.world.pos.y + 40.0f; - subCamAt.z = this->actor.world.pos.z; - Play_SetCameraAtEye(play, this->subCamId, &subCamAt, &subCam->eye); + if (!GameInteractor_Should(VB_ENEMY_CUTSCENE_ACTION, true, this)) { + return; } + + subCam = Play_GetCamera(play, this->subCamId); + subCamAt.x = this->actor.world.pos.x; + subCamAt.y = this->actor.world.pos.y + 40.0f; + subCamAt.z = this->actor.world.pos.z; + Play_SetCameraAtEye(play, this->subCamId, &subCamAt, &subCam->eye); } } @@ -2418,14 +2424,16 @@ void EnBigslime_GekkoDespawn(EnBigslime* this, PlayState* play) { if (this->despawnTimer == 0) { EnBigslime_SetupFrogSpawn(this, play); } else { - if (GameInteractor_Should(VB_ENEMY_CUTSCENE_ACTION, true, this)) { - subCam = Play_GetCamera(play, this->subCamId); - Math_Vec3f_Copy(&subCamAt, &subCam->at); - Math_Vec3f_Diff(&subCam->eye, &this->subCamDistToFrog, &subCamEye); - subCamEye.y -= 1.8f; - subCamAt.y -= 1.7f; - Play_SetCameraAtEye(play, this->subCamId, &subCamAt, &subCamEye); + if (!GameInteractor_Should(VB_ENEMY_CUTSCENE_ACTION, true, this)) { + return; } + + subCam = Play_GetCamera(play, this->subCamId); + Math_Vec3f_Copy(&subCamAt, &subCam->at); + Math_Vec3f_Diff(&subCam->eye, &this->subCamDistToFrog, &subCamEye); + subCamEye.y -= 1.8f; + subCamAt.y -= 1.7f; + Play_SetCameraAtEye(play, this->subCamId, &subCamAt, &subCamEye); } } diff --git a/mm/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c b/mm/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c index 3d5355d8a..63663a334 100644 --- a/mm/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c +++ b/mm/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c @@ -326,30 +326,34 @@ s32 func_8086A2CC(EnPametfrog* this, CollisionPoly* floorPoly) { } void EnPametfrog_ShakeCamera(EnPametfrog* this, PlayState* play, f32 magShakeXZ, f32 magShakeY) { - if (GameInteractor_Should(VB_ENEMY_CUTSCENE_ACTION, true, this)) { - Camera* subCam = Play_GetCamera(play, this->subCamId); - s16 subCamYaw; - Vec3f subCamEye; - - subCamYaw = BINANG_ROT180(Camera_GetCamDirYaw(subCam)); - subCamEye.x = (Math_SinS(subCamYaw) * magShakeXZ) + subCam->at.x; - subCamEye.y = subCam->at.y + magShakeY; - subCamEye.z = (Math_CosS(subCamYaw) * magShakeXZ) + subCam->at.z; - Play_SetCameraAtEye(play, this->subCamId, &subCam->at, &subCamEye); + if (!GameInteractor_Should(VB_ENEMY_CUTSCENE_ACTION, true, this)) { + return; } + + Camera* subCam = Play_GetCamera(play, this->subCamId); + s16 subCamYaw; + Vec3f subCamEye; + + subCamYaw = BINANG_ROT180(Camera_GetCamDirYaw(subCam)); + subCamEye.x = (Math_SinS(subCamYaw) * magShakeXZ) + subCam->at.x; + subCamEye.y = subCam->at.y + magShakeY; + subCamEye.z = (Math_CosS(subCamYaw) * magShakeXZ) + subCam->at.z; + Play_SetCameraAtEye(play, this->subCamId, &subCam->at, &subCamEye); } void EnPametfrog_StopCutscene(EnPametfrog* this, PlayState* play) { - if (GameInteractor_Should(VB_ENEMY_CUTSCENE_ACTION, true, this)) { - Camera* subCam; + if (!GameInteractor_Should(VB_ENEMY_CUTSCENE_ACTION, true, this)) { + return; + } - if (this->subCamId != SUB_CAM_ID_DONE) { - subCam = Play_GetCamera(play, this->subCamId); - Play_SetCameraAtEye(play, CAM_ID_MAIN, &subCam->at, &subCam->eye); - this->subCamId = SUB_CAM_ID_DONE; - CutsceneManager_Stop(this->csId); - Player_SetCsAction(play, &this->actor, PLAYER_CSACTION_END); - } + Camera* subCam; + + if (this->subCamId != SUB_CAM_ID_DONE) { + subCam = Play_GetCamera(play, this->subCamId); + Play_SetCameraAtEye(play, CAM_ID_MAIN, &subCam->at, &subCam->eye); + this->subCamId = SUB_CAM_ID_DONE; + CutsceneManager_Stop(this->csId); + Player_SetCsAction(play, &this->actor, PLAYER_CSACTION_END); } } diff --git a/mm/src/overlays/actors/ovl_En_Wiz/z_en_wiz.c b/mm/src/overlays/actors/ovl_En_Wiz/z_en_wiz.c index f8e368afd..2bd9656d7 100644 --- a/mm/src/overlays/actors/ovl_En_Wiz/z_en_wiz.c +++ b/mm/src/overlays/actors/ovl_En_Wiz/z_en_wiz.c @@ -833,22 +833,24 @@ void EnWiz_Dance(EnWiz* this, PlayState* play) { } void EnWiz_SetupSecondPhaseCutscene(EnWiz* this, PlayState* play) { - if (GameInteractor_Should(VB_ENEMY_CUTSCENE_ACTION, true, this)) { - s16 secondPhaseCsId = CutsceneManager_GetAdditionalCsId(this->actor.csId); + if (!GameInteractor_Should(VB_ENEMY_CUTSCENE_ACTION, true, this)) { + return; + } - if (!CutsceneManager_IsNext(secondPhaseCsId)) { - CutsceneManager_Queue(secondPhaseCsId); - } else { - CutsceneManager_StartWithPlayerCsAndSetFlag(secondPhaseCsId, &this->actor); - this->subCamId = CutsceneManager_GetCurrentSubCamId(secondPhaseCsId); - this->actor.flags |= ACTOR_FLAG_100000; - EnWiz_ChangeAnim(this, EN_WIZ_ANIM_DANCE, false); - this->action = EN_WIZ_ACTION_RUN_BETWEEN_PLATFORMS; - this->nextPlatformIndex = 1; - this->hasRunToEveryPlatform = false; - Math_SmoothStepToS(&this->alpha, 255, 1, 5, 0); - this->actionFunc = EnWiz_SecondPhaseCutscene; - } + s16 secondPhaseCsId = CutsceneManager_GetAdditionalCsId(this->actor.csId); + + if (!CutsceneManager_IsNext(secondPhaseCsId)) { + CutsceneManager_Queue(secondPhaseCsId); + } else { + CutsceneManager_StartWithPlayerCsAndSetFlag(secondPhaseCsId, &this->actor); + this->subCamId = CutsceneManager_GetCurrentSubCamId(secondPhaseCsId); + this->actor.flags |= ACTOR_FLAG_100000; + EnWiz_ChangeAnim(this, EN_WIZ_ANIM_DANCE, false); + this->action = EN_WIZ_ACTION_RUN_BETWEEN_PLATFORMS; + this->nextPlatformIndex = 1; + this->hasRunToEveryPlatform = false; + Math_SmoothStepToS(&this->alpha, 255, 1, 5, 0); + this->actionFunc = EnWiz_SecondPhaseCutscene; } }