mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-03-26 13:01:52 +00:00
Replace new gametype-specific checks with gametyperule checks
- K_PlayerTripwireSpeedThreshold, K_CheckpointCrossAward - repaced with "GTR_CIRCUIT and not K_Cooperative" - excludes Sealed Stars as before, but includes custom Race-based gametypes
- UFO Spawner tracking on minimap - GTR_PAPERITEMS, per how UFOs are handled in k_battle.c
- G_RandMapPerPlayerCount: Check for the absence of GT_SPECIAL when excluding LF_SECTIONRACE, not the presence of GT_RACE
- Little bit of a hack, but right now there's no way to do custom cooperative gametypes, we don't have proper access to gametyperules in this function, and Battle courses aren't going to have this flag anyways
This commit is contained in:
parent
026831d9c8
commit
57c5fa3cd7
3 changed files with 8 additions and 4 deletions
|
|
@ -3932,7 +3932,11 @@ tryAgain:
|
|||
continue;
|
||||
}
|
||||
|
||||
if (numPlayers == 2 && gametype == GT_RACE && ((mapheaderinfo[i]->levelflags & LF_SECTIONRACE) == LF_SECTIONRACE))
|
||||
// TODO - We don't have guaranteed access to gametype/rules of TOL.
|
||||
// If revising in future and willing to break this function open,
|
||||
// this should be checking for GTR_CIRCUIT and not cooperative
|
||||
// (but K_Cooperative also won't be correct inside this func).
|
||||
if (numPlayers == 2 && gametype != GT_SPECIAL && ((mapheaderinfo[i]->levelflags & LF_SECTIONRACE) == LF_SECTIONRACE))
|
||||
{
|
||||
// Duel doesn't support sprints.
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -6448,7 +6448,7 @@ static void K_drawKartMinimap(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (gametype == GT_BATTLE && Obj_GetNextUFOSpawner() != NULL)
|
||||
if ((gametyperules & GTR_PAPERITEMS) && Obj_GetNextUFOSpawner() != NULL)
|
||||
{
|
||||
const INT32 prevsplitflags = splitflags;
|
||||
mobj_t *spawner = Obj_GetNextUFOSpawner();
|
||||
|
|
|
|||
|
|
@ -3119,7 +3119,7 @@ fixed_t K_PlayerTripwireSpeedThreshold(const player_t *player)
|
|||
|
||||
UINT32 distance = K_GetItemRouletteDistance(player, 8);
|
||||
|
||||
if (gametype == GT_RACE && M_NotFreePlay() && !modeattacking)
|
||||
if ((gametyperules & GTR_CIRCUIT) && !K_Cooperative() && M_NotFreePlay() && !modeattacking)
|
||||
{
|
||||
if (distance < SCAMDIST) // Players near 1st need more speed!
|
||||
{
|
||||
|
|
@ -4618,7 +4618,7 @@ static void K_HandleRaceSplits(player_t *player, tic_t time, UINT8 checkpoint)
|
|||
|
||||
void K_CheckpointCrossAward(player_t *player)
|
||||
{
|
||||
if (gametype != GT_RACE)
|
||||
if (!(gametyperules & GTR_CIRCUIT) || K_Cooperative())
|
||||
return;
|
||||
|
||||
if (!demo.playback && G_TimeAttackStart())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue