From f365dbc10da16611cd43fbca234a80f5e8e39b23 Mon Sep 17 00:00:00 2001 From: kai Date: Tue, 30 Jun 2020 16:42:44 +0100 Subject: implement g_preventRagequit --- src/game/g_admin.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/game/g_admin.c') diff --git a/src/game/g_admin.c b/src/game/g_admin.c index 91189eb..e79ced6 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -6797,6 +6797,15 @@ qboolean G_admin_putmespec( gentity_t *ent, int skiparg ) ADMP("!specme: disabled when game is paused\n"); return qfalse; } + + 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 qfalse; + } if(ent->client->pers.teamSelection == PTE_NONE) return qfalse; -- cgit