mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Simplify intermission timer code
- We had two ways of ending the intermission, but only one would actually be used, and it resulted in code duplication. - Combine the two ways. - Disable the reached-but-didn't-do-anything-before-now code path for setting endtic.
This commit is contained in:
parent
a22d3b201d
commit
5103b804ba
1 changed files with 4 additions and 14 deletions
|
|
@ -657,18 +657,8 @@ void Y_Ticker(void)
|
||||||
P_DoTeamscrambling();
|
P_DoTeamscrambling();
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
// multiplayer uses timer (based on cv_inttime)
|
if ((timer && !--timer)
|
||||||
if (timer)
|
|| (intertic == endtic))
|
||||||
{
|
|
||||||
if (!--timer)
|
|
||||||
{
|
|
||||||
Y_EndIntermission();
|
|
||||||
G_AfterIntermission();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// single player is hardcoded to go away after awhile
|
|
||||||
else if (intertic == endtic)
|
|
||||||
{
|
{
|
||||||
Y_EndIntermission();
|
Y_EndIntermission();
|
||||||
G_AfterIntermission();
|
G_AfterIntermission();
|
||||||
|
|
@ -746,8 +736,8 @@ void Y_Ticker(void)
|
||||||
S_StartSound(NULL, (kaching ? sfx_chchng : sfx_ptally));
|
S_StartSound(NULL, (kaching ? sfx_chchng : sfx_ptally));
|
||||||
Y_CalculateMatchData(2, Y_CompareRank);
|
Y_CalculateMatchData(2, Y_CompareRank);
|
||||||
}
|
}
|
||||||
else
|
/*else -- This is how to define an endtic, but we currently use timer for both SP and MP.
|
||||||
endtic = intertic + 3*TICRATE; // 3 second pause after end of tally
|
endtic = intertic + 3*TICRATE;*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue