[quake3-commits] r1872 - trunk/code/game

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Feb 8 12:58:32 EST 2011


Author: thilo
Date: 2011-02-08 12:58:31 -0500 (Tue, 08 Feb 2011)
New Revision: 1872

Modified:
   trunk/code/game/g_cmds.c
Log:
Fix levelshot so that it cannot be executed by remote clients (#4339)


Modified: trunk/code/game/g_cmds.c
===================================================================
--- trunk/code/game/g_cmds.c	2011-02-08 17:25:45 UTC (rev 1871)
+++ trunk/code/game/g_cmds.c	2011-02-08 17:58:31 UTC (rev 1872)
@@ -392,11 +392,18 @@
 
 	// 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" );
 }



More information about the quake3-commits mailing list