mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Add GTR_CHECKPOINTS
- Prevents Checkpoint from spawning - Prevents spawnpoint-handling code from occouring
This commit is contained in:
parent
2bbf69ded3
commit
467b5f831b
4 changed files with 26 additions and 19 deletions
|
|
@ -5986,6 +5986,7 @@ const char *const GAMETYPERULE_LIST[] = {
|
||||||
"KARMA",
|
"KARMA",
|
||||||
"ITEMARROWS",
|
"ITEMARROWS",
|
||||||
|
|
||||||
|
"CHECKPOINTS",
|
||||||
"PRISONS",
|
"PRISONS",
|
||||||
"CATCHER",
|
"CATCHER",
|
||||||
"ROLLINGSTART",
|
"ROLLINGSTART",
|
||||||
|
|
|
||||||
|
|
@ -622,25 +622,26 @@ enum GameTypeRules
|
||||||
GTR_ITEMARROWS = 1<<9, // Show item box arrows above players
|
GTR_ITEMARROWS = 1<<9, // Show item box arrows above players
|
||||||
|
|
||||||
// Bonus gametype rules
|
// Bonus gametype rules
|
||||||
GTR_PRISONS = 1<<10, // Can enter Prison Break mode
|
GTR_CHECKPOINTS = 1<<10, // Player respawns at specific checkpoints
|
||||||
GTR_CATCHER = 1<<11, // UFO Catcher (only works with GTR_CIRCUIT)
|
GTR_PRISONS = 1<<11, // Can enter Prison Break mode
|
||||||
GTR_ROLLINGSTART = 1<<12, // Rolling start (only works with GTR_CIRCUIT)
|
GTR_CATCHER = 1<<12, // UFO Catcher (only works with GTR_CIRCUIT)
|
||||||
GTR_SPECIALSTART = 1<<13, // White fade instant start
|
GTR_ROLLINGSTART = 1<<13, // Rolling start (only works with GTR_CIRCUIT)
|
||||||
GTR_BOSS = 1<<14, // Boss intro and spawning
|
GTR_SPECIALSTART = 1<<14, // White fade instant start
|
||||||
|
GTR_BOSS = 1<<15, // Boss intro and spawning
|
||||||
|
|
||||||
// General purpose rules
|
// General purpose rules
|
||||||
GTR_POINTLIMIT = 1<<15, // Reaching point limit ends the round
|
GTR_POINTLIMIT = 1<<16, // Reaching point limit ends the round
|
||||||
GTR_TIMELIMIT = 1<<16, // Reaching time limit ends the round
|
GTR_TIMELIMIT = 1<<17, // Reaching time limit ends the round
|
||||||
GTR_OVERTIME = 1<<17, // Allow overtime behavior
|
GTR_OVERTIME = 1<<18, // Allow overtime behavior
|
||||||
GTR_ENCORE = 1<<18, // Alternate Encore mirroring, scripting, and texture remapping
|
GTR_ENCORE = 1<<19, // Alternate Encore mirroring, scripting, and texture remapping
|
||||||
|
|
||||||
GTR_TEAMS = 1<<19, // Teams are forced on
|
GTR_TEAMS = 1<<20, // Teams are forced on
|
||||||
GTR_NOTEAMS = 1<<20, // Teams are forced off
|
GTR_NOTEAMS = 1<<21, // Teams are forced off
|
||||||
GTR_TEAMSTARTS = 1<<21, // Use team-based start positions
|
GTR_TEAMSTARTS = 1<<22, // Use team-based start positions
|
||||||
|
|
||||||
GTR_NOMP = 1<<22, // No multiplayer
|
GTR_NOMP = 1<<23, // No multiplayer
|
||||||
GTR_NOCUPSELECT = 1<<23, // Your maps are not selected via cup.
|
GTR_NOCUPSELECT = 1<<24, // Your maps are not selected via cup.
|
||||||
GTR_NOPOSITION = 1<<24, // No POSITION
|
GTR_NOPOSITION = 1<<25, // No POSITION
|
||||||
|
|
||||||
// free: to and including 1<<31
|
// free: to and including 1<<31
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -2469,9 +2469,10 @@ void G_MovePlayerToSpawnOrCheatcheck(INT32 playernum)
|
||||||
mobj_t *checkpoint;
|
mobj_t *checkpoint;
|
||||||
vector3_t pos;
|
vector3_t pos;
|
||||||
|
|
||||||
if (players[playernum].checkpointId &&
|
if ((gametyperules & GTR_CHECKPOINTS)
|
||||||
(checkpoint = Obj_FindCheckpoint(players[playernum].checkpointId)) &&
|
&& players[playernum].checkpointId
|
||||||
Obj_GetCheckpointRespawnPosition(checkpoint, &pos))
|
&& (checkpoint = Obj_FindCheckpoint(players[playernum].checkpointId))
|
||||||
|
&& Obj_GetCheckpointRespawnPosition(checkpoint, &pos))
|
||||||
{
|
{
|
||||||
respawnvars_t *rsp = &players[playernum].respawn;
|
respawnvars_t *rsp = &players[playernum].respawn;
|
||||||
|
|
||||||
|
|
@ -3057,7 +3058,7 @@ static gametype_t defaultgametypes[] =
|
||||||
{
|
{
|
||||||
"Tutorial",
|
"Tutorial",
|
||||||
"GT_TUTORIAL",
|
"GT_TUTORIAL",
|
||||||
GTR_NOMP|GTR_NOCUPSELECT|GTR_NOPOSITION,
|
GTR_CHECKPOINTS|GTR_NOMP|GTR_NOCUPSELECT|GTR_NOPOSITION,
|
||||||
TOL_TUTORIAL,
|
TOL_TUTORIAL,
|
||||||
int_none,
|
int_none,
|
||||||
0,
|
0,
|
||||||
|
|
|
||||||
|
|
@ -12318,6 +12318,10 @@ static boolean P_AllowMobjSpawn(mapthing_t* mthing, mobjtype_t i)
|
||||||
if (modeattacking & ATTACKING_SPB)
|
if (modeattacking & ATTACKING_SPB)
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
|
case MT_CHECKPOINT_END:
|
||||||
|
if (!(gametyperules & GTR_CHECKPOINTS))
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue