[nexuiz-commits] r8486 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Jan 6 10:12:25 EST 2010
Author: fruitiex
Date: 2010-01-06 10:12:24 -0500 (Wed, 06 Jan 2010)
New Revision: 8486
Modified:
trunk/data/qcsrc/server/gamecommand.qc
Log:
sv_cmd defer_clear <id> and sv_cmd defer_clear_all
Modified: trunk/data/qcsrc/server/gamecommand.qc
===================================================================
--- trunk/data/qcsrc/server/gamecommand.qc 2010-01-06 15:01:53 UTC (rev 8485)
+++ trunk/data/qcsrc/server/gamecommand.qc 2010-01-06 15:12:24 UTC (rev 8486)
@@ -1291,6 +1291,42 @@
return;
}
+ if(argv(0) == "defer_clear")
+ if(argc == 2)
+ {
+ entno = stof(argv(1));
+
+ // player_id is out of range
+ if((entno < 1) | (entno > maxclients)) {
+ print("Player ", argv(1), " doesn't exist\n");
+ return;
+ }
+
+ client = edict_num(entno);
+
+ if not(client.flags & FL_CLIENT) {
+ print("Player ", argv(1), " doesn't exist\n");
+ return;
+ }
+
+ if(clienttype(client) == CLIENTTYPE_BOT) {
+ print("Player ", argv(1), " (", client.netname, ") is a bot\n");
+ return;
+ }
+
+ stuffcmd(client, "defer clear\n");
+ print("defer clear stuffed to ", argv(1), " (", client.netname, ")\n");
+ return;
+ }
+
+ if(argv(0) == "defer_clear_all")
+ {
+ FOR_EACH_CLIENTSLOT(client)
+ GameCommand(strcat("defer_clear ", ftos(num_for_edict(client))));
+
+ return;
+ }
+
print("Invalid command. For a list of supported commands, try sv_cmd help.\n");
}
More information about the nexuiz-commits
mailing list