mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Reset a couple of other variables while we're at it
This commit is contained in:
parent
33e99a0276
commit
571d6f2124
1 changed files with 23 additions and 3 deletions
26
src/g_game.c
26
src/g_game.c
|
|
@ -2216,12 +2216,32 @@ void G_Ticker(boolean run)
|
||||||
// Costs a life to retry ... unless the player in question is dead already, or you haven't even touched the first starpost in marathon run.
|
// Costs a life to retry ... unless the player in question is dead already, or you haven't even touched the first starpost in marathon run.
|
||||||
if (marathonmode && gamemap == spmarathon_start && !players[consoleplayer].starposttime)
|
if (marathonmode && gamemap == spmarathon_start && !players[consoleplayer].starposttime)
|
||||||
{
|
{
|
||||||
|
player_t *p = &players[consoleplayer];
|
||||||
marathonmode |= MA_INIT;
|
marathonmode |= MA_INIT;
|
||||||
marathontime = 0;
|
marathontime = 0;
|
||||||
|
|
||||||
tokenlist = 0;
|
numgameovers = tokenlist = token = 0;
|
||||||
token = 0;
|
countdown = countdown2 = exitfadestarted = 0;
|
||||||
emeralds = 0;
|
|
||||||
|
p->playerstate = PST_REBORN;
|
||||||
|
p->starpostx = p->starposty = p->starpostz = 0;
|
||||||
|
|
||||||
|
p->lives = startinglivesbalance[0];
|
||||||
|
p->continues = 1;
|
||||||
|
|
||||||
|
p->score = 0;
|
||||||
|
|
||||||
|
// The latter two should clear by themselves, but just in case
|
||||||
|
p->pflags &= ~(PF_TAGIT|PF_GAMETYPEOVER|PF_FULLSTASIS);
|
||||||
|
|
||||||
|
// Clear cheatcodes too, just in case.
|
||||||
|
p->pflags &= ~(PF_GODMODE|PF_NOCLIP|PF_INVIS);
|
||||||
|
|
||||||
|
p->xtralife = 0;
|
||||||
|
|
||||||
|
// Reset unlockable triggers
|
||||||
|
unlocktriggers = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (G_GametypeUsesLives() && players[consoleplayer].playerstate == PST_LIVE && players[consoleplayer].lives != INFLIVES)
|
else if (G_GametypeUsesLives() && players[consoleplayer].playerstate == PST_LIVE && players[consoleplayer].lives != INFLIVES)
|
||||||
players[consoleplayer].lives -= 1;
|
players[consoleplayer].lives -= 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue