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();
|
||||
}*/
|
||||
|
||||
// multiplayer uses timer (based on cv_inttime)
|
||||
if (timer)
|
||||
{
|
||||
if (!--timer)
|
||||
{
|
||||
Y_EndIntermission();
|
||||
G_AfterIntermission();
|
||||
return;
|
||||
}
|
||||
}
|
||||
// single player is hardcoded to go away after awhile
|
||||
else if (intertic == endtic)
|
||||
if ((timer && !--timer)
|
||||
|| (intertic == endtic))
|
||||
{
|
||||
Y_EndIntermission();
|
||||
G_AfterIntermission();
|
||||
|
|
@ -746,8 +736,8 @@ void Y_Ticker(void)
|
|||
S_StartSound(NULL, (kaching ? sfx_chchng : sfx_ptally));
|
||||
Y_CalculateMatchData(2, Y_CompareRank);
|
||||
}
|
||||
else
|
||||
endtic = intertic + 3*TICRATE; // 3 second pause after end of tally
|
||||
/*else -- This is how to define an endtic, but we currently use timer for both SP and MP.
|
||||
endtic = intertic + 3*TICRATE;*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue