diff options
author | kai <kai@zittrig.eu> | 2020-06-30 16:42:44 +0100 |
---|---|---|
committer | kai <kai@zittrig.eu> | 2020-06-30 16:42:44 +0100 |
commit | f365dbc10da16611cd43fbca234a80f5e8e39b23 (patch) | |
tree | 0b96be9f196a5a66b922c38129d6ab5b35d66280 /src/game/g_cmds.c | |
parent | 85de4090aaa7128c494ff66c1a87e5a445f58cde (diff) |
implement g_preventRagequit
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r-- | src/game/g_cmds.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index f033cc4..5810f56 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -805,7 +805,18 @@ void Cmd_Team_f( gentity_t *ent ) } if( !Q_stricmpn( s, "spec", 4 ) ) + { + if( g_preventRagequit.integer > 0 + && ( ( ent->client->pers.teamSelection == PTE_HUMANS && level.numHumanSpawns == 0 ) + || ( ent->client->pers.teamSelection == PTE_ALIENS && level.numAlienSpawns == 0 ) ) ) + { + AP( va("print \"^3!specme: ^7%s^7 must gather their party before venturing forth from this place. " + "^3(ragequit not allowed!)\n\"", ent->client->pers.netname ) ); + return; + } team = PTE_NONE; + } + else if( !force && ent->client->pers.teamSelection == PTE_NONE && g_maxGameClients.integer && level.numPlayingClients >= g_maxGameClients.integer ) |