Special Stages/token stuff
This commit is contained in:
parent
9228f99260
commit
5daedc70e7
|
@ -8919,6 +8919,8 @@ static const char *const GAMETYPERULE_LIST[] = {
|
||||||
"PITYSHIELD",
|
"PITYSHIELD",
|
||||||
"DEATHPENALTY",
|
"DEATHPENALTY",
|
||||||
"NOSPECTATORSPAWN",
|
"NOSPECTATORSPAWN",
|
||||||
|
"SPECIALSTAGES",
|
||||||
|
"EMERALDTOKENS",
|
||||||
"EMERALDHUNT",
|
"EMERALDHUNT",
|
||||||
"SPAWNENEMIES",
|
"SPAWNENEMIES",
|
||||||
"ALLOWEXIT",
|
"ALLOWEXIT",
|
||||||
|
|
|
@ -411,14 +411,16 @@ enum GameTypeRules
|
||||||
GTR_PITYSHIELD = 1<<14, // Award pity shield
|
GTR_PITYSHIELD = 1<<14, // Award pity shield
|
||||||
GTR_DEATHPENALTY = 1<<15, // Death score penalty
|
GTR_DEATHPENALTY = 1<<15, // Death score penalty
|
||||||
GTR_NOSPECTATORSPAWN = 1<<16, // For use with GTR_SPECTATORS - spawn in the map instead of with the spectators
|
GTR_NOSPECTATORSPAWN = 1<<16, // For use with GTR_SPECTATORS - spawn in the map instead of with the spectators
|
||||||
GTR_EMERALDHUNT = 1<<17, // Emerald Hunt
|
GTR_SPECIALSTAGES = 1<<17, // Allow special stages
|
||||||
GTR_SPAWNENEMIES = 1<<18, // Spawn enemies
|
GTR_EMERALDTOKENS = 1<<18, // Spawn emerald tokens
|
||||||
GTR_ALLOWEXIT = 1<<19, // Allow exit sectors
|
GTR_EMERALDHUNT = 1<<19, // Emerald Hunt
|
||||||
GTR_ROUNDENDMESSAGE = 1<<20, // Prints "The round has ended." into the console
|
GTR_SPAWNENEMIES = 1<<20, // Spawn enemies
|
||||||
GTR_NOTITLECARD = 1<<21, // Don't show the title card
|
GTR_ALLOWEXIT = 1<<21, // Allow exit sectors
|
||||||
GTR_POINTLIMIT = 1<<22, // Ringslinger point limit
|
GTR_ROUNDENDMESSAGE = 1<<22, // Prints "The round has ended." into the console
|
||||||
GTR_TIMELIMIT = 1<<23, // Ringslinger time limit
|
GTR_NOTITLECARD = 1<<23, // Don't show the title card
|
||||||
GTR_OVERTIME = 1<<24, // Allow overtime
|
GTR_POINTLIMIT = 1<<24, // Ringslinger point limit
|
||||||
|
GTR_TIMELIMIT = 1<<25, // Ringslinger time limit
|
||||||
|
GTR_OVERTIME = 1<<26, // Allow overtime
|
||||||
};
|
};
|
||||||
|
|
||||||
// String names for gametypes
|
// String names for gametypes
|
||||||
|
|
|
@ -3088,9 +3088,9 @@ const char *Gametype_ConstantNames[NUMGAMETYPES] =
|
||||||
UINT32 gametypedefaultrules[NUMGAMETYPES] =
|
UINT32 gametypedefaultrules[NUMGAMETYPES] =
|
||||||
{
|
{
|
||||||
// Co-op
|
// Co-op
|
||||||
GTR_PLATFORM|GTR_LIVES|GTR_CHASECAM|GTR_EMERALDHUNT|GTR_SPAWNENEMIES|GTR_ALLOWEXIT,
|
GTR_PLATFORM|GTR_LIVES|GTR_CHASECAM|GTR_EMERALDHUNT|GTR_SPAWNENEMIES|GTR_ALLOWEXIT|GTR_EMERALDTOKENS|GTR_SPECIALSTAGES,
|
||||||
// Competition
|
// Competition
|
||||||
GTR_PLATFORM|GTR_LIVES|GTR_RACE|GTR_CHASECAM|GTR_SPAWNENEMIES|GTR_ALLOWEXIT|GTR_ROUNDENDMESSAGE,
|
GTR_PLATFORM|GTR_LIVES|GTR_RACE|GTR_CHASECAM|GTR_SPAWNENEMIES|GTR_ALLOWEXIT|GTR_ROUNDENDMESSAGE|GTR_EMERALDTOKENS,
|
||||||
// Race
|
// Race
|
||||||
GTR_PLATFORM|GTR_RACE|GTR_CHASECAM|GTR_SPAWNENEMIES|GTR_ALLOWEXIT|GTR_ROUNDENDMESSAGE,
|
GTR_PLATFORM|GTR_RACE|GTR_CHASECAM|GTR_SPAWNENEMIES|GTR_ALLOWEXIT|GTR_ROUNDENDMESSAGE,
|
||||||
|
|
||||||
|
@ -3530,7 +3530,7 @@ static void G_DoCompleted(void)
|
||||||
if (nextmap >= 1100-1 && nextmap <= 1102-1 && (gametyperules & GTR_RACE))
|
if (nextmap >= 1100-1 && nextmap <= 1102-1 && (gametyperules & GTR_RACE))
|
||||||
nextmap = (INT16)(spstage_start-1);
|
nextmap = (INT16)(spstage_start-1);
|
||||||
|
|
||||||
if ((gottoken = (gametype == GT_COOP && token)))
|
if ((gottoken = ((gametyperules & GTR_SPECIALSTAGES) && token)))
|
||||||
{
|
{
|
||||||
token--;
|
token--;
|
||||||
|
|
||||||
|
|
|
@ -625,7 +625,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
|
|
||||||
P_AddPlayerScore(player, 1000);
|
P_AddPlayerScore(player, 1000);
|
||||||
|
|
||||||
if (gametype != GT_COOP || modeattacking) // score only?
|
if (!(gametyperules & GTR_SPECIALSTAGES) || modeattacking) // score only?
|
||||||
{
|
{
|
||||||
S_StartSound(toucher, sfx_chchng);
|
S_StartSound(toucher, sfx_chchng);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -11811,7 +11811,7 @@ You should think about modifying the deathmatch starts to take full advantage of
|
||||||
return; // no doubles
|
return; // no doubles
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == MT_TOKEN && ((gametype != GT_COOP && gametype != GT_COMPETITION) || tokenbits == 30 || tokenlist & (1 << tokenbits++)))
|
if (i == MT_TOKEN && (!(gametyperules & GTR_EMERALDTOKENS) || tokenbits == 30 || tokenlist & (1 << tokenbits++)))
|
||||||
return; // you already got this token, or there are too many, or the gametype's not right
|
return; // you already got this token, or there are too many, or the gametype's not right
|
||||||
|
|
||||||
if (i == MT_EMBLEM && (netgame || multiplayer || (modifiedgame && !savemoddata))) // No cheating!!
|
if (i == MT_EMBLEM && (netgame || multiplayer || (modifiedgame && !savemoddata))) // No cheating!!
|
||||||
|
|
Loading…
Reference in a new issue