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:
toaster 2022-10-13 13:12:07 +01:00
parent a22d3b201d
commit 5103b804ba

View file

@ -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;*/
} }
} }
} }