- changed map startup order to first play a cutscene before loading the level.

Something with the timers is screwing up here if a cutscene gets played - Blood's timer code is even worse than Duke's.
Fixes #151.
This commit is contained in:
Christoph Oelckers 2020-08-11 23:21:08 +02:00
parent 4c01f1e073
commit 83796e9eed

View file

@ -373,9 +373,6 @@ void StartLevel(GAMEOPTIONS *gameOptions)
{ {
if (!(gGameOptions.uGameFlags&1)) if (!(gGameOptions.uGameFlags&1))
levelSetupOptions(gGameOptions.nEpisode, gGameOptions.nLevel); levelSetupOptions(gGameOptions.nEpisode, gGameOptions.nLevel);
if (gEpisodeInfo[gGameOptions.nEpisode].cutALevel == gGameOptions.nLevel
&& gEpisodeInfo[gGameOptions.nEpisode].cutsceneAName)
gGameOptions.uGameFlags |= 4;
/////// ///////
gGameOptions.weaponsV10x = gWeaponsV10x; gGameOptions.weaponsV10x = gWeaponsV10x;
@ -891,16 +888,17 @@ static void commonTicker(bool &playvideo)
} }
if (gStartNewGame) if (gStartNewGame)
{ {
StartLevel(&gGameOptions);
auto completion = [](bool = false) auto completion = [](bool = false)
{ {
StartLevel(&gGameOptions);
levelTryPlayMusicOrNothing(gGameOptions.nEpisode, gGameOptions.nLevel); levelTryPlayMusicOrNothing(gGameOptions.nEpisode, gGameOptions.nLevel);
gNetFifoClock = gFrameClock = totalclock; gNetFifoClock = gFrameClock = totalclock;
gamestate = GS_LEVEL; gamestate = GS_LEVEL;
}; };
if ((gGameOptions.uGameFlags & 4)) if (gEpisodeInfo[gGameOptions.nEpisode].cutALevel == gGameOptions.nLevel
&& gEpisodeInfo[gGameOptions.nEpisode].cutsceneAName[0])
levelPlayIntroScene(gGameOptions.nEpisode, completion); levelPlayIntroScene(gGameOptions.nEpisode, completion);
else else
completion(false); completion(false);