- made cutscenes at engine startup work.

This commit is contained in:
Christoph Oelckers 2022-06-04 21:31:19 +02:00
parent ab856e4f6a
commit c597ba2fef
3 changed files with 12 additions and 4 deletions

View file

@ -3426,6 +3426,7 @@ static int D_InitGame(const FIWADInfo* iwad_info, TArray<FString>& allwads, TArr
}
else
{
I_SetFrameTime();
if (!StartCutscene(gameinfo.IntroScene, SJ_BLOCKUI, [=](bool) {
gameaction = ga_titleloop;
})) D_StartTitle();

View file

@ -1201,6 +1201,11 @@ void G_Ticker ()
case ga_titleloop:
D_StartTitle();
break;
case ga_intro:
gamestate = GS_INTRO;
gameaction = ga_nothing;
break;
default:

View file

@ -274,6 +274,12 @@ void FMapInfoParser::ParseGameInfo()
if (sc.TokenType == '}') break;
sc.TokenMustBe(TK_Identifier);
if (sc.Compare("intro"))
{
ParseCutscene(gameinfo.IntroScene);
continue;
}
FString nextKey = sc.String;
sc.MustGetToken('=');
@ -362,10 +368,6 @@ void FMapInfoParser::ParseGameInfo()
gameinfo.Dialogue = sc.String;
gameinfo.AddDialogues.Clear();
}
else if (nextKey.CompareNoCase("intro") == 0)
{
ParseCutscene(gameinfo.IntroScene);
}
// Insert valid keys here.
GAMEINFOKEY_STRING(mCheatKey, "cheatKey")