From e6f475ab2290ff7bc847336ed1f211f2092ac602 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Wed, 7 Sep 2005 21:04:37 +0000 Subject: * Fixed bug where a server with only spectators would get stuck on games which ended via timelimit --- src/game/g_main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/game') diff --git a/src/game/g_main.c b/src/game/g_main.c index 77aa54b1..abde0daf 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -1544,7 +1544,7 @@ wait 10 seconds before going on. */ void CheckIntermissionExit( void ) { - int ready, notReady; + int ready, notReady, numPlayers; int i; gclient_t *cl; int readyMask; @@ -1560,6 +1560,7 @@ void CheckIntermissionExit( void ) ready = 0; notReady = 0; readyMask = 0; + numPlayers = 0; for( i = 0; i < g_maxclients.integer; i++ ) { cl = level.clients + i; @@ -1580,6 +1581,8 @@ void CheckIntermissionExit( void ) } else notReady++; + + numPlayers++; } trap_SetConfigstring( CS_CLIENTS_READY, va( "%d", readyMask ) ); @@ -1589,7 +1592,7 @@ void CheckIntermissionExit( void ) return; // if nobody wants to go, clear timer - if( !ready ) + if( !ready && numPlayers ) { level.readyToExit = qfalse; return; -- cgit