- Allow disabling of level start/end cutscenes if a user desires.

* Allows for situations where in Blood or Exhumed, you wish to have a shortcut that directly gets you into a level.
* Could be used for seamless playing options if a user doesn't care for level ending screens.
* Not exposing this to the menu for now as I doubt demand would be high for such a thing.
This commit is contained in:
Mitchell Richters 2023-04-05 17:46:40 +10:00
parent 0f07ea9e37
commit 32e6e1ce5f

View file

@ -61,11 +61,21 @@ static SummaryInfo summaryinfo;
// //
//============================================================================= //=============================================================================
CVARD(Bool, cl_nostartscreens, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/disable skipping level exit screens")
CVARD(Bool, cl_noexitscreens, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/disable skipping level entry screens")
//=============================================================================
//
//
//
//=============================================================================
void Local_Job_Init() void Local_Job_Init()
{ {
maprecordtype = NewPointer(NewStruct("MapRecord", nullptr, true)); maprecordtype = NewPointer(NewStruct("MapRecord", nullptr, true));
summaryinfotype = NewPointer(NewStruct("SummaryInfo", nullptr, true)); summaryinfotype = NewPointer(NewStruct("SummaryInfo", nullptr, true));
} }
//============================================================================= //=============================================================================
// //
// //
@ -213,7 +223,7 @@ void ShowIntermission(MapRecord* fromMap, MapRecord* toMap, SummaryInfo* info, C
auto runner = cutscene.runner; auto runner = cutscene.runner;
try try
{ {
if (fromMap && (!(fromMap->gameflags & LEVEL_BOSSONLYCUTSCENE) || bossexit)) if (!cl_noexitscreens && fromMap && (!(fromMap->gameflags & LEVEL_BOSSONLYCUTSCENE) || bossexit))
{ {
if (!CreateCutscene(&fromMap->outro, runner, fromMap, !!toMap)) if (!CreateCutscene(&fromMap->outro, runner, fromMap, !!toMap))
{ {
@ -222,10 +232,10 @@ void ShowIntermission(MapRecord* fromMap, MapRecord* toMap, SummaryInfo* info, C
} }
} }
if (fromMap || (g_gameType & GAMEFLAG_PSEXHUMED)) if ((!cl_noexitscreens && fromMap) || (!cl_nostartscreens && (g_gameType & GAMEFLAG_PSEXHUMED)))
CallCreateSummaryFunction(globalCutscenes.SummaryScreen, runner, fromMap, info, toMap); CallCreateSummaryFunction(globalCutscenes.SummaryScreen, runner, fromMap, info, toMap);
if (toMap) if (!cl_nostartscreens && toMap)
{ {
if (!CreateCutscene(&toMap->intro, runner, toMap, !!fromMap)) if (!CreateCutscene(&toMap->intro, runner, toMap, !!fromMap))
{ {