[nexuiz-commits] r8570 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Jan 25 12:13:06 EST 2010


Author: div0
Date: 2010-01-25 12:12:49 -0500 (Mon, 25 Jan 2010)
New Revision: 8570

Modified:
   trunk/data/qcsrc/server/cheats.qc
Log:
dead people shouldn't cheat

Modified: trunk/data/qcsrc/server/cheats.qc
===================================================================
--- trunk/data/qcsrc/server/cheats.qc	2010-01-25 17:12:14 UTC (rev 8569)
+++ trunk/data/qcsrc/server/cheats.qc	2010-01-25 17:12:49 UTC (rev 8570)
@@ -46,13 +46,25 @@
 
 float CheatsAllowed(float i, float argc, float fr) // the cheat gets passed as argument for possible future ACL checking
 {
+	// dead people cannot cheat
+	if(self.deadflag != DEAD_NO)
+		return 0;
+	if(self.classname != "player")
+		return 0;
+	
+	// sv_clones
 	if(i == CHIMPULSE_CLONE_MOVING || i == CHIMPULSE_CLONE_STANDING)
 		if(self.lip < sv_clones)
 			return 1;
+
+	// haha
 	if(self.maycheat)
 		return 1;
+	
+	// sv_cheats
 	if(sv_cheats && autocvar_sv_cheats)
 		return 1;
+
 	return 0;
 }
 



More information about the nexuiz-commits mailing list