From ad1726e7682e23cd7fe0ae31cac5bfdf95459c6c Mon Sep 17 00:00:00 2001 From: "M. Kristall" Date: Sat, 3 Oct 2009 12:21:32 +0000 Subject: * Bring back g_maxGameClients (thanks kevlarman) --- src/game/g_cmds.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index cbd9f63b..befed91d 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -628,6 +628,15 @@ void Cmd_Team_f( gentity_t *ent ) if( oldteam == team ) return; + if( team != TEAM_NONE && g_maxGameClients.integer && + level.numPlayingClients >= g_maxGameClients.integer ) + { + trap_SendServerCommand( ent-g_entities, va( "print \"The maximum number of " + "playing clients has been reached (g_maxGameClients = %d)\n\"", + g_maxGameClients.integer ) ); + return; + } + // guard against build timer exploit if( oldteam != TEAM_NONE && ent->client->sess.spectatorState == SPECTATOR_NOT && ( ent->client->ps.stats[ STAT_CLASS ] == PCL_ALIEN_BUILDER0 || -- cgit