From 487e114fee73f4ee4624f5635c7c65a923b40d17 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Sat, 22 Sep 2018 18:59:26 -0400 Subject: [PATCH] raceexittime var --- src/doomstat.h | 2 ++ src/g_game.c | 2 ++ src/p_inter.c | 2 +- src/p_tick.c | 4 ++-- src/p_user.c | 18 +++++++++--------- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/doomstat.h b/src/doomstat.h index f54abebc..fc13b0e8 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -413,6 +413,8 @@ extern UINT16 extralifetics; // SRB2kart extern tic_t introtime; extern tic_t starttime; +extern tic_t raceexittime; +extern tic_t battleexittime; extern INT32 hyudorotime; extern INT32 stealtime; extern INT32 sneakertime; diff --git a/src/g_game.c b/src/g_game.c index 73d20bfd..e501fa56 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -209,6 +209,8 @@ UINT16 extralifetics = 4*TICRATE; // SRB2kart tic_t introtime = 108+5; // plus 5 for white fade tic_t starttime = 6*TICRATE + (3*TICRATE/4); +tic_t raceexittime = 5*TICRATE + (2*TICRATE/3); +tic_t battleexittime = 8*TICRATE; INT32 hyudorotime = 7*TICRATE; INT32 stealtime = TICRATE/2; INT32 sneakertime = TICRATE + (TICRATE/3); diff --git a/src/p_inter.c b/src/p_inter.c index 74612949..7a148464 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -694,7 +694,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) if (!playeringame[i] || players[i].spectator) continue; - players[i].exiting = (28*TICRATE)/5 + 1; + players[i].exiting = raceexittime+1; } S_StartSound(NULL, sfx_lvpass); } diff --git a/src/p_tick.c b/src/p_tick.c index 3bdc9884..3a55353d 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -448,7 +448,7 @@ static inline void P_DoSpecialStageStuff(void) { if (playeringame[i]) { - players[i].exiting = (28*TICRATE)/5 + 1; + players[i].exiting = raceexittime+1; players[i].pflags &= ~PF_GLIDING; } @@ -485,7 +485,7 @@ static inline void P_DoSpecialStageStuff(void) if (playeringame[i]) { players[i].mo->momx = players[i].mo->momy = 0; - players[i].exiting = (28*TICRATE)/5 + 1; + players[i].exiting = raceexittime+1; } sstimer = 0; diff --git a/src/p_user.c b/src/p_user.c index 165008b7..688e0f7d 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -673,7 +673,7 @@ static void P_DeNightserizePlayer(player_t *player) for (i = 0; i < MAXPLAYERS; i++) if (playeringame[i] && players[i].pflags & PF_NIGHTSMODE) players[i].nightstime = 1; // force everyone else to fall too. - player->exiting = 6*TICRATE; + player->exiting = raceexittime+2; stagefailed = true; // NIGHT OVER } @@ -1744,7 +1744,7 @@ void P_DoPlayerExit(player_t *player) S_StartSound(player->mo, sfx_kwin); } - player->exiting = 6*TICRATE; + player->exiting = raceexittime+2; if (cv_inttime.value > 0) P_EndingMusic(player); @@ -1754,15 +1754,15 @@ void P_DoPlayerExit(player_t *player) //countdown2 = countdown + 8*TICRATE; if (P_CheckRacers()) - player->exiting = (28*TICRATE)/5 + 1; + player->exiting = raceexittime+1; } else if (G_BattleGametype()) // Battle Mode exiting { - player->exiting = 8*TICRATE + 1; + player->exiting = battleexittime+1; P_EndingMusic(player); } else - player->exiting = (28*TICRATE)/5 + 2; // Accidental death safeguard??? + player->exiting = raceexittime+2; // Accidental death safeguard??? //player->pflags &= ~PF_GLIDING; /* // SRB2kart - don't need @@ -6572,7 +6572,7 @@ static void P_MovePlayer(player_t *player) S_StartSound(NULL, sfx_s3k6a); for (i = 0; i < MAXPLAYERS; i++) if (playeringame[i]) - players[i].exiting = (28*TICRATE)/5 + 1; + players[i].exiting = raceexittime+1; } else if (player->health > 1) P_DamageMobj(player->mo, NULL, NULL, 1); @@ -9040,8 +9040,8 @@ void P_PlayerThink(player_t *player) } } - if (i == MAXPLAYERS && player->exiting == 6*TICRATE) // finished - player->exiting = (28*TICRATE)/5 + 1; + if (i == MAXPLAYERS && player->exiting == raceexittime+2) // finished + player->exiting = raceexittime+1; // If 10 seconds are left on the timer, // begin the drown music for countdown! @@ -9066,7 +9066,7 @@ void P_PlayerThink(player_t *player) // If it is set, start subtracting // Don't allow it to go back to 0 - if (player->exiting > 1 && (player->exiting < 6*TICRATE || !G_RaceGametype())) // SRB2kart - "&& player->exiting > 1" + if (player->exiting > 1 && (player->exiting < raceexittime+2 || !G_RaceGametype())) // SRB2kart - "&& player->exiting > 1" player->exiting--; if (player->exiting && countdown2)