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 (gametype == GT_COOP)
if (gametyperules & GTR_CAMPAIGN)
{
G_SetGamestate(GS_WAITINGPLAYERS); // hack to prevent a command repeat

View File

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

View File

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

View File

@ -3193,7 +3193,7 @@ const char *Gametype_ConstantNames[NUMGAMETYPES] =
UINT32 gametypedefaultrules[NUMGAMETYPES] =
{
// 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
GTR_RACE|GTR_LIVES|GTR_SPAWNENEMIES|GTR_EMERALDTOKENS|GTR_SPAWNINVUL|GTR_ALLOWEXIT,
// Race
@ -3765,7 +3765,7 @@ void G_AfterIntermission(void)
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);
else
{
@ -3875,7 +3875,7 @@ static void G_DoContinued(void)
void G_EndGame(void)
{
// Only do evaluation and credits in coop games.
if (gametype == GT_COOP)
if (gametyperules & GTR_CUTSCENES)
{
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;
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);
else
G_DoLoadLevel(resetplayer);