summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2005-09-07 21:04:37 +0000
committerTim Angus <tim@ngus.net>2005-09-07 21:04:37 +0000
commite6f475ab2290ff7bc847336ed1f211f2092ac602 (patch)
tree419a839dc0911d46af2b80eb38fe63457d93c017
parentf6f2b1ed00355557eda1fc32f657382cd118de1e (diff)
* Fixed bug where a server with only spectators would get stuck on games which ended via timelimit
-rw-r--r--src/game/g_main.c7
1 files changed, 5 insertions, 2 deletions
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;