Skip to content

Commit c660220

Browse files
Return to setup loop if cutscene fails to load.
If the intro cutscene failed to play, the game would get stuck in its setup loop with a blank screen and no menu. This caused a hang in the demo, which has no cutscenes. Also in the demo, the game would not end once the elevator switch was activated, since the game was expecting to be able to play an ending cutscene. Explicitly entering the setup loop if a cutscene fails to play fixes both problems.
1 parent 9afef51 commit c660220

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: src/GameSrc/cutsloop.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,12 @@ short play_cutscene(int id, bool show_credits)
275275
MacTuneKillCurrentTheme();
276276

277277
cutscene_filehandle = ResOpenFile(cutscene_files[id]);
278-
if (cutscene_filehandle <= 0) return 0;
278+
if (cutscene_filehandle <= 0) {
279+
// If we failed to play the cutscene, go to setup / credits.
280+
_new_mode = SETUP_LOOP;
281+
chg_set_flg(GL_CHG_LOOP);
282+
return 0;
283+
}
279284

280285
INFO("Playing Cutscene %i", id);
281286

0 commit comments

Comments
 (0)