Add GTR_CUTSCENES. And I ran out of rule slots. Cool.

This commit is contained in:
Jaime Passos 2019-12-28 20:33:28 -03:00
parent ae0acfba0f
commit 2166571920
4 changed files with 7 additions and 5 deletions

View file

@ -715,7 +715,7 @@ void D_StartTitle(void)
if (netgame) if (netgame)
{ {
if (gametype == GT_COOP) if (gametyperules & GTR_CAMPAIGN)
{ {
G_SetGamestate(GS_WAITINGPLAYERS); // hack to prevent a command repeat G_SetGamestate(GS_WAITINGPLAYERS); // hack to prevent a command repeat

View file

@ -8930,6 +8930,7 @@ static const char *const GAMETYPERULE_LIST[] = {
"SPAWNENEMIES", "SPAWNENEMIES",
"ALLOWEXIT", "ALLOWEXIT",
"NOTITLECARD", "NOTITLECARD",
"CUTSCENES",
NULL NULL
}; };

View file

@ -425,6 +425,7 @@ enum GameTypeRules
GTR_SPAWNENEMIES = 1<<28, // Spawn enemies GTR_SPAWNENEMIES = 1<<28, // Spawn enemies
GTR_ALLOWEXIT = 1<<29, // Allow exit sectors GTR_ALLOWEXIT = 1<<29, // Allow exit sectors
GTR_NOTITLECARD = 1<<30, // Don't show the title card GTR_NOTITLECARD = 1<<30, // Don't show the title card
GTR_CUTSCENES = 1<<31, // Play cutscenes, ending, credits, and evaluation
}; };
// String names for gametypes // String names for gametypes

View file

@ -3193,7 +3193,7 @@ const char *Gametype_ConstantNames[NUMGAMETYPES] =
UINT32 gametypedefaultrules[NUMGAMETYPES] = UINT32 gametypedefaultrules[NUMGAMETYPES] =
{ {
// Co-op // Co-op
GTR_CAMPAIGN|GTR_LIVES|GTR_FRIENDLY|GTR_SPAWNENEMIES|GTR_ALLOWEXIT|GTR_EMERALDHUNT|GTR_EMERALDTOKENS|GTR_SPECIALSTAGES, GTR_CAMPAIGN|GTR_LIVES|GTR_FRIENDLY|GTR_SPAWNENEMIES|GTR_ALLOWEXIT|GTR_EMERALDHUNT|GTR_EMERALDTOKENS|GTR_SPECIALSTAGES|GTR_CUTSCENES,
// Competition // Competition
GTR_RACE|GTR_LIVES|GTR_SPAWNENEMIES|GTR_EMERALDTOKENS|GTR_SPAWNINVUL|GTR_ALLOWEXIT, GTR_RACE|GTR_LIVES|GTR_SPAWNENEMIES|GTR_EMERALDTOKENS|GTR_SPAWNINVUL|GTR_ALLOWEXIT,
// Race // Race
@ -3765,7 +3765,7 @@ void G_AfterIntermission(void)
HU_ClearCEcho(); HU_ClearCEcho();
if (mapheaderinfo[gamemap-1]->cutscenenum && !modeattacking && skipstats <= 1) // Start a custom cutscene. if ((gametyperules & GTR_CUTSCENES) && mapheaderinfo[gamemap-1]->cutscenenum && !modeattacking && skipstats <= 1) // Start a custom cutscene.
F_StartCustomCutscene(mapheaderinfo[gamemap-1]->cutscenenum-1, false, false); F_StartCustomCutscene(mapheaderinfo[gamemap-1]->cutscenenum-1, false, false);
else else
{ {
@ -3875,7 +3875,7 @@ static void G_DoContinued(void)
void G_EndGame(void) void G_EndGame(void)
{ {
// Only do evaluation and credits in coop games. // Only do evaluation and credits in coop games.
if (gametype == GT_COOP) if (gametyperules & GTR_CUTSCENES)
{ {
if (nextmap == 1103-1) // end game with ending if (nextmap == 1103-1) // end game with ending
{ {
@ -4578,7 +4578,7 @@ void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer, boolean
automapactive = false; automapactive = false;
imcontinuing = false; imcontinuing = false;
if (!skipprecutscene && mapheaderinfo[gamemap-1]->precutscenenum && !modeattacking) // Start a custom cutscene. if ((gametyperules & GTR_CUTSCENES) && !skipprecutscene && mapheaderinfo[gamemap-1]->precutscenenum && !modeattacking) // Start a custom cutscene.
F_StartCustomCutscene(mapheaderinfo[gamemap-1]->precutscenenum-1, true, resetplayer); F_StartCustomCutscene(mapheaderinfo[gamemap-1]->precutscenenum-1, true, resetplayer);
else else
G_DoLoadLevel(resetplayer); G_DoLoadLevel(resetplayer);