source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

[TF2] Readymode countdown logic fixes

Open mtxfellen opened this issue 8 months ago • 0 comments

Description

Various minor fixes for the readymode countdown timer.

  • Fix the game skipping to the final countdown 1s early.
    • Issue is caused by (int)(flTime - gpGlobals->curtime) truncating the decimal part of the countdown. Adding ceil permits the number 11 back in to the lands.
  • Reset the game ready state if a disconnecting player would cause the game to fall under the minimum player count required to start.
    • This is a cosmetic change as it isn't possible for the game to begin in this state anyway, but the countdown still continues uninterruptibly to scare the remaining players.
  • Fix the countdown continuing when the only readied-up player in MvM disconnects.
    • There's already a check for this in tournament readymode, but an equivalent check was not present for MvM.
  • Respect mp_tournament_readymode_countdown in MvM.
    • This is hardcoded to 10s, but there isn't really any harm in allowing this CVar to be used instead as it also defaults to 10s.

mtxfellen avatar May 28 '25 17:05 mtxfellen