Fix g_warmup < 2 causing client prediction issues (bug #5740). (Reused code for tournament gametype.)

This commit is contained in:
Zack Middleton 2012-09-09 22:14:15 +00:00
parent e3fc1826b1
commit c65142179f

View file

@ -1522,7 +1522,12 @@ void CheckTournament( void ) {
// if all players have arrived, start the countdown
if ( level.warmupTime < 0 ) {
// fudge by -1 to account for extra delays
level.warmupTime = level.time + ( g_warmup.integer - 1 ) * 1000;
if ( g_warmup.integer > 1 ) {
level.warmupTime = level.time + ( g_warmup.integer - 1 ) * 1000;
} else {
level.warmupTime = 0;
}
trap_SetConfigstring( CS_WARMUP, va("%i", level.warmupTime) );
return;
}