mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-01-05 15:11:16 +00:00
Prevent multiple star cutscenes from causing a rare softlock
This commit is contained in:
parent
804bee1ff7
commit
ebcaddede4
1 changed files with 9 additions and 1 deletions
|
@ -394,6 +394,7 @@ struct CameraStoredInfo sCameraStoreCutscene;
|
||||||
// first iteration of data
|
// first iteration of data
|
||||||
u32 unused8032CFC0 = 0;
|
u32 unused8032CFC0 = 0;
|
||||||
struct Object *gCutsceneFocus = NULL;
|
struct Object *gCutsceneFocus = NULL;
|
||||||
|
const BehaviorScript *gCutsceneFocusBehavior = NULL;
|
||||||
// other camera focuses?
|
// other camera focuses?
|
||||||
u32 unused8032CFC8 = 0;
|
u32 unused8032CFC8 = 0;
|
||||||
u32 unused8032CFCC = 0;
|
u32 unused8032CFCC = 0;
|
||||||
|
@ -3277,6 +3278,7 @@ void reset_camera(struct Camera *c) {
|
||||||
gCutsceneObjSpawn = 0;
|
gCutsceneObjSpawn = 0;
|
||||||
gObjCutsceneDone = FALSE;
|
gObjCutsceneDone = FALSE;
|
||||||
gCutsceneFocus = NULL;
|
gCutsceneFocus = NULL;
|
||||||
|
gCutsceneFocusBehavior = NULL;
|
||||||
unused8032CFC8 = 0;
|
unused8032CFC8 = 0;
|
||||||
unused8032CFCC = 0;
|
unused8032CFCC = 0;
|
||||||
gSecondCameraFocus = NULL;
|
gSecondCameraFocus = NULL;
|
||||||
|
@ -6944,6 +6946,7 @@ void start_object_cutscene(u8 cutscene, struct Object *o) {
|
||||||
sObjectCutscene = cutscene;
|
sObjectCutscene = cutscene;
|
||||||
gRecentCutscene = 0;
|
gRecentCutscene = 0;
|
||||||
gCutsceneFocus = o;
|
gCutsceneFocus = o;
|
||||||
|
gCutsceneFocusBehavior = o->behavior;
|
||||||
gObjCutsceneDone = FALSE;
|
gObjCutsceneDone = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11295,9 +11298,14 @@ void play_cutscene(struct Camera *c) {
|
||||||
gCameraMovementFlags &= ~CAM_MOVING_INTO_MODE;
|
gCameraMovementFlags &= ~CAM_MOVING_INTO_MODE;
|
||||||
|
|
||||||
if (gCutsceneFocus != NULL) {
|
if (gCutsceneFocus != NULL) {
|
||||||
if (gCutsceneFocus->activeFlags == ACTIVE_FLAG_DEACTIVATED) {
|
if (gCutsceneFocus->activeFlags == ACTIVE_FLAG_DEACTIVATED || gCutsceneFocus->behavior != gCutsceneFocusBehavior) {
|
||||||
gObjCutsceneDone = true;
|
gObjCutsceneDone = true;
|
||||||
gTimeStopState = 0;
|
gTimeStopState = 0;
|
||||||
|
|
||||||
|
sStatusFlags |= CAM_FLAG_SMOOTH_MOVEMENT;
|
||||||
|
gCutsceneTimer = CUTSCENE_STOP;
|
||||||
|
c->cutscene = 0;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue