diff options
author | M. Kristall <mkpdev@gmail.com> | 2009-10-03 12:21:32 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:15:53 +0000 |
commit | ad1726e7682e23cd7fe0ae31cac5bfdf95459c6c (patch) | |
tree | f3376ce14f816ae6eb2e8325cf0f3d9a04882a38 /src | |
parent | 098ef510fd03d0d7264f0348ff2c4ac7c39e5a73 (diff) |
* Bring back g_maxGameClients (thanks kevlarman)
Diffstat (limited to 'src')
-rw-r--r-- | src/game/g_cmds.c | 9 |
1 files changed, 9 insertions, 0 deletions
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 || |