From d2612c8a3692c50acc19037818a9e197b296ccff Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Tue, 8 Feb 2011 17:58:31 +0000 Subject: [PATCH] Fix levelshot so that it cannot be executed by remote clients (#4339) --- code/game/g_cmds.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/code/game/g_cmds.c b/code/game/g_cmds.c index 06df2db7..aa79ba48 100644 --- a/code/game/g_cmds.c +++ b/code/game/g_cmds.c @@ -392,11 +392,18 @@ void Cmd_LevelShot_f( gentity_t *ent ) { // doesn't work in single player if ( g_gametype.integer != 0 ) { - trap_SendServerCommand( ent-g_entities, + trap_SendServerCommand( ent-g_entities, "print \"Must be in g_gametype 0 for levelshot\n\"" ); return; } + if(!ent->client->pers.localClient) + { + trap_SendServerCommand(ent-g_entities, + "print \"The levelshot command must be executed by a local client\n\""); + return; + } + BeginIntermission(); trap_SendServerCommand( ent-g_entities, "clientLevelShot" ); }