mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Margin Boost
This commit is contained in:
parent
2f164cf1b8
commit
c4fc86b668
5 changed files with 19 additions and 1 deletions
|
|
@ -869,6 +869,7 @@ extern boolean rainbowstartavailable;
|
||||||
extern tic_t linecrossed;
|
extern tic_t linecrossed;
|
||||||
extern boolean inDuel;
|
extern boolean inDuel;
|
||||||
extern UINT8 extralaps;
|
extern UINT8 extralaps;
|
||||||
|
extern UINT8 overtimecheckpoints;
|
||||||
|
|
||||||
extern tic_t bombflashtimer; // Used to avoid causing seizures if multiple mines explode close to you :)
|
extern tic_t bombflashtimer; // Used to avoid causing seizures if multiple mines explode close to you :)
|
||||||
extern boolean legitimateexit;
|
extern boolean legitimateexit;
|
||||||
|
|
|
||||||
|
|
@ -321,6 +321,7 @@ boolean rainbowstartavailable; // Boolean, keeps track of if the rainbow start w
|
||||||
tic_t linecrossed; // For Time Attack
|
tic_t linecrossed; // For Time Attack
|
||||||
boolean inDuel; // Boolean, keeps track of if it is a 1v1
|
boolean inDuel; // Boolean, keeps track of if it is a 1v1
|
||||||
UINT8 extralaps; // Duel extensions!
|
UINT8 extralaps; // Duel extensions!
|
||||||
|
UINT8 overtimecheckpoints; // Duel overtime speedups!
|
||||||
|
|
||||||
// Client-sided, unsynched variables (NEVER use in anything that needs to be synced with other players)
|
// Client-sided, unsynched variables (NEVER use in anything that needs to be synced with other players)
|
||||||
tic_t bombflashtimer = 0; // Cooldown before another FlashPal can be intialized by a bomb exploding near a displayplayer. Avoids seizures.
|
tic_t bombflashtimer = 0; // Cooldown before another FlashPal can be intialized by a bomb exploding near a displayplayer. Avoids seizures.
|
||||||
|
|
|
||||||
14
src/k_kart.c
14
src/k_kart.c
|
|
@ -146,6 +146,7 @@ void K_TimerReset(void)
|
||||||
inDuel = rainbowstartavailable = false;
|
inDuel = rainbowstartavailable = false;
|
||||||
linecrossed = 0;
|
linecrossed = 0;
|
||||||
extralaps = 0;
|
extralaps = 0;
|
||||||
|
overtimecheckpoints = 0;
|
||||||
timelimitintics = extratimeintics = secretextratime = 0;
|
timelimitintics = extratimeintics = secretextratime = 0;
|
||||||
g_pointlimit = 0;
|
g_pointlimit = 0;
|
||||||
}
|
}
|
||||||
|
|
@ -466,7 +467,10 @@ fixed_t K_GetKartGameSpeedScalar(SINT8 value)
|
||||||
if (cv_4thgear.value && !netgame && (!demo.playback || !demo.netgame) && !modeattacking)
|
if (cv_4thgear.value && !netgame && (!demo.playback || !demo.netgame) && !modeattacking)
|
||||||
value = 3;
|
value = 3;
|
||||||
|
|
||||||
return ((13 + (3*value)) << FRACBITS) / 16;
|
fixed_t base = ((13 + (3*value)) << FRACBITS) / 16;
|
||||||
|
fixed_t duel = overtimecheckpoints*(1<<FRACBITS)/3;
|
||||||
|
|
||||||
|
return base + duel;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Array of states to pick the starting point of the animation, based on the actual time left for invincibility.
|
// Array of states to pick the starting point of the animation, based on the actual time left for invincibility.
|
||||||
|
|
@ -4150,6 +4154,14 @@ void K_CheckpointCrossAward(player_t *player)
|
||||||
if (inDuel && player->position == 1)
|
if (inDuel && player->position == 1)
|
||||||
{
|
{
|
||||||
player->duelscore += 1;
|
player->duelscore += 1;
|
||||||
|
|
||||||
|
if (leveltime > DUELOVERTIME)
|
||||||
|
{
|
||||||
|
overtimecheckpoints++;
|
||||||
|
K_AddMessage(va("MARGIN BOOST x%d", overtimecheckpoints), true, false);
|
||||||
|
S_StartSound(NULL, sfx_gsha6);
|
||||||
|
}
|
||||||
|
|
||||||
for (UINT8 i = 0; i < MAXPLAYERS; i++)
|
for (UINT8 i = 0; i < MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
if (playeringame[i] && !players[i].spectator && &players[i] != player)
|
if (playeringame[i] && !players[i].spectator && &players[i] != player)
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,8 @@ Make sure this matches the actual number of states
|
||||||
#define RINGVOLUMEREGEN 1
|
#define RINGVOLUMEREGEN 1
|
||||||
#define RINGTRANSPARENCYREGEN 3
|
#define RINGTRANSPARENCYREGEN 3
|
||||||
|
|
||||||
|
#define DUELOVERTIME (3*60*TICRATE)
|
||||||
|
|
||||||
#define MIN_WAVEDASH_CHARGE ((11*TICRATE/16)*9)
|
#define MIN_WAVEDASH_CHARGE ((11*TICRATE/16)*9)
|
||||||
|
|
||||||
#define MAXTOPACCEL (12*FRACUNIT)
|
#define MAXTOPACCEL (12*FRACUNIT)
|
||||||
|
|
|
||||||
|
|
@ -6681,6 +6681,7 @@ static void P_NetArchiveMisc(savebuffer_t *save, boolean resending)
|
||||||
WRITEUINT8(save->p, rainbowstartavailable);
|
WRITEUINT8(save->p, rainbowstartavailable);
|
||||||
WRITEUINT8(save->p, inDuel);
|
WRITEUINT8(save->p, inDuel);
|
||||||
WRITEUINT8(save->p, extralaps);
|
WRITEUINT8(save->p, extralaps);
|
||||||
|
WRITEUINT8(save->p, overtimecheckpoints);
|
||||||
|
|
||||||
WRITEUINT32(save->p, introtime);
|
WRITEUINT32(save->p, introtime);
|
||||||
WRITEUINT32(save->p, starttime);
|
WRITEUINT32(save->p, starttime);
|
||||||
|
|
@ -6888,6 +6889,7 @@ static boolean P_NetUnArchiveMisc(savebuffer_t *save, boolean reloading)
|
||||||
rainbowstartavailable = (boolean)READUINT8(save->p);
|
rainbowstartavailable = (boolean)READUINT8(save->p);
|
||||||
inDuel = (boolean)READUINT8(save->p);
|
inDuel = (boolean)READUINT8(save->p);
|
||||||
extralaps = (boolean)READUINT8(save->p);
|
extralaps = (boolean)READUINT8(save->p);
|
||||||
|
overtimecheckpoints = (boolean)READUINT8(save->p);
|
||||||
|
|
||||||
introtime = READUINT32(save->p);
|
introtime = READUINT32(save->p);
|
||||||
starttime = READUINT32(save->p);
|
starttime = READUINT32(save->p);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue