[nexuiz-commits] r8554 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Jan 25 12:05:26 EST 2010
Author: div0
Date: 2010-01-25 12:05:08 -0500 (Mon, 25 Jan 2010)
New Revision: 8554
Modified:
trunk/data/qcsrc/server/cheats.qc
trunk/data/qcsrc/server/clientcommands.qc
Log:
do engine cheats in qc too
Modified: trunk/data/qcsrc/server/cheats.qc
===================================================================
--- trunk/data/qcsrc/server/cheats.qc 2010-01-25 17:04:39 UTC (rev 8553)
+++ trunk/data/qcsrc/server/cheats.qc 2010-01-25 17:05:08 UTC (rev 8554)
@@ -530,6 +530,55 @@
for(e = world; (e = find(e, classname, "drag_digit")); )
remove(e);
goto cheated;
+ case "god":
+ BITXOR_ASSIGN(self.flags, FL_GODMODE);
+ if(self.flags & FL_GODMODE)
+ {
+ sprint(self, "godmode ON\n");
+ goto cheated;
+ }
+ else
+ sprint(self, "godmode OFF\n");
+ break;
+ case "notarget":
+ BITXOR_ASSIGN(self.flags, FL_NOTARGET);
+ if(self.flags & FL_NOTARGET)
+ {
+ sprint(self, "notarget ON\n");
+ goto cheated;
+ }
+ else
+ sprint(self, "notarget OFF\n");
+ break;
+ case "noclip":
+ if(self.movetype != MOVETYPE_NOCLIP)
+ {
+ self.movetype = MOVETYPE_NOCLIP;
+ sprint(self, "noclip ON\n");
+ goto cheated;
+ }
+ else
+ {
+ self.movetype = MOVETYPE_WALK;
+ sprint(self, "noclip OFF\n");
+ }
+ break;
+ case "fly":
+ if(self.movetype != MOVETYPE_FLY)
+ {
+ self.movetype = MOVETYPE_FLY;
+ sprint(self, "flmodey ON\n");
+ goto cheated;
+ }
+ else
+ {
+ self.movetype = MOVETYPE_WALK;
+ sprint(self, "flymode OFF\n");
+ }
+ break;
+ case "give":
+ // TODO
+ break;
}
return 0;
Modified: trunk/data/qcsrc/server/clientcommands.qc
===================================================================
--- trunk/data/qcsrc/server/clientcommands.qc 2010-01-25 17:04:39 UTC (rev 8553)
+++ trunk/data/qcsrc/server/clientcommands.qc 2010-01-25 17:05:08 UTC (rev 8554)
@@ -411,16 +411,6 @@
// return;
// grep for Cmd_AddCommand_WithClientCommand to find them all
if(cmd != "status")
- if(cmd != "max")
- if(cmd != "monster")
- if(cmd != "scrag")
- if(cmd != "wraith")
- if(cmd != "gimme")
- if(cmd != "god")
- if(cmd != "notarget")
- if(cmd != "fly")
- if(cmd != "noclip")
- if(cmd != "give")
//if(cmd != "say") // handled above
//if(cmd != "say_team") // handled above
if(cmd != "kill")
More information about the nexuiz-commits
mailing list