mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 15:32:33 +00:00
Special Stages/token stuff
This commit is contained in:
parent
9228f99260
commit
5daedc70e7
5 changed files with 17 additions and 13 deletions
|
@ -8919,6 +8919,8 @@ static const char *const GAMETYPERULE_LIST[] = {
|
|||
"PITYSHIELD",
|
||||
"DEATHPENALTY",
|
||||
"NOSPECTATORSPAWN",
|
||||
"SPECIALSTAGES",
|
||||
"EMERALDTOKENS",
|
||||
"EMERALDHUNT",
|
||||
"SPAWNENEMIES",
|
||||
"ALLOWEXIT",
|
||||
|
|
|
@ -411,14 +411,16 @@ enum GameTypeRules
|
|||
GTR_PITYSHIELD = 1<<14, // Award pity shield
|
||||
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_EMERALDHUNT = 1<<17, // Emerald Hunt
|
||||
GTR_SPAWNENEMIES = 1<<18, // Spawn enemies
|
||||
GTR_ALLOWEXIT = 1<<19, // Allow exit sectors
|
||||
GTR_ROUNDENDMESSAGE = 1<<20, // Prints "The round has ended." into the console
|
||||
GTR_NOTITLECARD = 1<<21, // Don't show the title card
|
||||
GTR_POINTLIMIT = 1<<22, // Ringslinger point limit
|
||||
GTR_TIMELIMIT = 1<<23, // Ringslinger time limit
|
||||
GTR_OVERTIME = 1<<24, // Allow overtime
|
||||
GTR_SPECIALSTAGES = 1<<17, // Allow special stages
|
||||
GTR_EMERALDTOKENS = 1<<18, // Spawn emerald tokens
|
||||
GTR_EMERALDHUNT = 1<<19, // Emerald Hunt
|
||||
GTR_SPAWNENEMIES = 1<<20, // Spawn enemies
|
||||
GTR_ALLOWEXIT = 1<<21, // Allow exit sectors
|
||||
GTR_ROUNDENDMESSAGE = 1<<22, // Prints "The round has ended." into the console
|
||||
GTR_NOTITLECARD = 1<<23, // Don't show the title card
|
||||
GTR_POINTLIMIT = 1<<24, // Ringslinger point limit
|
||||
GTR_TIMELIMIT = 1<<25, // Ringslinger time limit
|
||||
GTR_OVERTIME = 1<<26, // Allow overtime
|
||||
};
|
||||
|
||||
// String names for gametypes
|
||||
|
|
|
@ -3088,9 +3088,9 @@ const char *Gametype_ConstantNames[NUMGAMETYPES] =
|
|||
UINT32 gametypedefaultrules[NUMGAMETYPES] =
|
||||
{
|
||||
// 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
|
||||
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
|
||||
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))
|
||||
nextmap = (INT16)(spstage_start-1);
|
||||
|
||||
if ((gottoken = (gametype == GT_COOP && token)))
|
||||
if ((gottoken = ((gametyperules & GTR_SPECIALSTAGES) && token)))
|
||||
{
|
||||
token--;
|
||||
|
||||
|
|
|
@ -625,7 +625,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
|
||||
P_AddPlayerScore(player, 1000);
|
||||
|
||||
if (gametype != GT_COOP || modeattacking) // score only?
|
||||
if (!(gametyperules & GTR_SPECIALSTAGES) || modeattacking) // score only?
|
||||
{
|
||||
S_StartSound(toucher, sfx_chchng);
|
||||
break;
|
||||
|
|
|
@ -11811,7 +11811,7 @@ You should think about modifying the deathmatch starts to take full advantage of
|
|||
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
|
||||
|
||||
if (i == MT_EMBLEM && (netgame || multiplayer || (modifiedgame && !savemoddata))) // No cheating!!
|
||||
|
|
Loading…
Reference in a new issue