Index: src/game/g_local.h =================================================================== --- src/game/g_local.h (revision 872) +++ src/game/g_local.h (working copy) @@ -553,7 +553,6 @@ int numNonSpectatorClients; // includes connecting clients int numPlayingClients; // connected, non-spectators int sortedClients[MAX_CLIENTS]; // sorted by score - int follow1, follow2; // clientNums for auto-follow spectators int snd_fry; // sound index for standing in lava Index: src/game/g_main.c =================================================================== --- src/game/g_main.c (revision 872) +++ src/game/g_main.c (working copy) @@ -1241,8 +1241,6 @@ gclient_t *cl; char P[ MAX_CLIENTS + 1 ] = {""}; - level.follow1 = -1; - level.follow2 = -1; level.numConnectedClients = 0; level.numNonSpectatorClients = 0; level.numPlayingClients = 0; @@ -1264,46 +1262,28 @@ level.numConnectedClients++; P[ i ] = (char)'0' + level.clients[ i ].pers.teamSelection; - if( !( level.clients[ i ].ps.pm_flags & PMF_FOLLOW ) ) + if( level.clients[ i ].pers.connected != CON_CONNECTED ) + continue; + if( level.clients[ i ].pers.teamSelection != PTE_NONE ) { - //so we know when the game ends and for team leveling - if( level.clients[ i ].ps.stats[ STAT_PTEAM ] == PTE_ALIENS ) + level.numPlayingClients++; + level.numVotingClients++; + level.numNonSpectatorClients++; + if( level.clients[ i ].pers.teamSelection == PTE_ALIENS ) { level.numAlienClients++; + level.numteamVotingClients[ 1 ]++; if( level.clients[ i ].sess.sessionTeam != TEAM_SPECTATOR ) level.numLiveAlienClients++; } - - if( level.clients[ i ].ps.stats[ STAT_PTEAM ] == PTE_HUMANS ) + else if( level.clients[ i ].pers.teamSelection == PTE_HUMANS ) { level.numHumanClients++; + level.numteamVotingClients[ 0 ]++; if( level.clients[ i ].sess.sessionTeam != TEAM_SPECTATOR ) level.numLiveHumanClients++; } } - - if( level.clients[ i ].sess.sessionTeam != TEAM_SPECTATOR ) - { - level.numNonSpectatorClients++; - - // decide if this should be auto-followed - if( level.clients[ i ].pers.connected == CON_CONNECTED ) - { - level.numPlayingClients++; - level.numVotingClients++; - - if( level.clients[ i ].ps.stats[ STAT_PTEAM ] == PTE_HUMANS ) - level.numteamVotingClients[ 0 ]++; - else if( level.clients[ i ].ps.stats[ STAT_PTEAM ] == PTE_ALIENS ) - level.numteamVotingClients[ 1 ]++; - - if( level.follow1 == -1 ) - level.follow1 = i; - else if( level.follow2 == -1 ) - level.follow2 = i; - } - - } } } P[ i + 1 ] = '\0';