From 3ac0cab7a7a47a07b71755c59bab24e0b70088bd Mon Sep 17 00:00:00 2001 From: tma Date: Thu, 23 Aug 2007 00:22:20 +0000 Subject: * (bug 3076) Map cycle breaks on empty or bot only servers (misanthropia) * (bug 3303) Removal of never compiled code from cgame drawing functions (beast ) * (bug 3297) Add missing limit to Q3 UI server info (beast ) * (bug 3029) Fix to shader hash table being overpopulated (identified by Stefan "#@" Langer ) git-svn-id: svn://svn.icculus.org/quake3/trunk@1129 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/game/g_main.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'code/game/g_main.c') diff --git a/code/game/g_main.c b/code/game/g_main.c index 62f3e86..f369ffc 100644 --- a/code/game/g_main.c +++ b/code/game/g_main.c @@ -1189,7 +1189,7 @@ wait 10 seconds before going on. ================= */ void CheckIntermissionExit( void ) { - int ready, notReady; + int ready, notReady, playerCount; int i; gclient_t *cl; int readyMask; @@ -1202,6 +1202,7 @@ void CheckIntermissionExit( void ) { ready = 0; notReady = 0; readyMask = 0; + playerCount = 0; for (i=0 ; i< g_maxclients.integer ; i++) { cl = level.clients + i; if ( cl->pers.connected != CON_CONNECTED ) { @@ -1211,6 +1212,7 @@ void CheckIntermissionExit( void ) { continue; } + playerCount++; if ( cl->readyToExit ) { ready++; if ( i < 16 ) { @@ -1236,16 +1238,19 @@ void CheckIntermissionExit( void ) { return; } - // if nobody wants to go, clear timer - if ( !ready ) { - level.readyToExit = qfalse; - return; - } + // only test ready status when there are real players present + if ( playerCount > 0 ) { + // if nobody wants to go, clear timer + if ( !ready ) { + level.readyToExit = qfalse; + return; + } - // if everyone wants to go, go now - if ( !notReady ) { - ExitLevel(); - return; + // if everyone wants to go, go now + if ( !notReady ) { + ExitLevel(); + return; + } } // the first person to ready starts the ten second timeout -- cgit v1.2.3