Actually, wait; this is way better and cleaner.

This commit is contained in:
toaster 2019-11-29 20:41:13 +00:00
parent ed0529b9d5
commit fdcc8c912a
1 changed files with 9 additions and 7 deletions

View File

@ -696,9 +696,10 @@ static void ST_drawTime(void)
// Counting down the hidetime?
if ((gametype == GT_TAG || gametype == GT_HIDEANDSEEK) && (stplyr->realtime <= (hidetime*TICRATE)))
{
tics = (hidetime*TICRATE + (TICRATE-1) - stplyr->realtime);
if ((tics+1-TICRATE) < 3*TICRATE)
ST_drawRaceNum(tics+1-TICRATE);
tics = (hidetime*TICRATE - stplyr->realtime);
if (tics < 3*TICRATE)
ST_drawRaceNum(tics);
tics += (TICRATE-1); // match the race num
downwards = true;
}
else
@ -710,11 +711,12 @@ static void ST_drawTime(void)
// Time limit?
if (gametype != GT_COOP && gametype != GT_RACE && gametype != GT_COMPETITION && cv_timelimit.value && timelimitintics > 0)
{
if (timelimitintics >= stplyr->realtime)
if (timelimitintics > stplyr->realtime)
{
tics = (timelimitintics + (TICRATE-1) - stplyr->realtime);
if ((tics+1-TICRATE) && (tics+1-TICRATE) < 3*TICRATE)
ST_drawRaceNum(tics+1-TICRATE);
tics = (timelimitintics - stplyr->realtime);
if (tics < 3*TICRATE)
ST_drawRaceNum(tics);
tics += (TICRATE-1); // match the race num
}
else // Overtime!
tics = 0;