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

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Jul 24 23:08:01 EDT 2009


Author: mand1nga
Date: 2009-07-24 23:07:59 -0400 (Fri, 24 Jul 2009)
New Revision: 7257

Modified:
   trunk/data/qcsrc/server/gamecommand.qc
Log:
Fix quite OBVIOUS bug preventing the execution of individual bot cmds called directly from the server console. Updated help cmd.

Modified: trunk/data/qcsrc/server/gamecommand.qc
===================================================================
--- trunk/data/qcsrc/server/gamecommand.qc	2009-07-23 17:21:39 UTC (rev 7256)
+++ trunk/data/qcsrc/server/gamecommand.qc	2009-07-25 03:07:59 UTC (rev 7257)
@@ -938,7 +938,9 @@
 			if(argc==2)
 			{
 				bot_list_commands();
-				print("\nUse sv_cmd bot_cmd help <command> for more\n");
+				print("\nsv_cmd bot_cmd reset          #Clear the cmd queues of all bots\n");
+				print("sv_cmd bot_cmd load <file>    #Load script file\n");
+				print("\nUse sv_cmd bot_cmd help <command> for more\n\n");
 				return;
 			}
 
@@ -946,12 +948,14 @@
 			return;
 		}
 
+		// Clear all bot queues
 		if(argv(1) == "reset")
 		{
 			bot_resetqueues();
 			return;
 		}
 
+		// Load cmds from file
 		if(argv(1) == "load" && argc == 3)
 		{
 			float fh;
@@ -998,9 +1002,9 @@
 			return;
 		}
 
-		bot = find_bot_by_number(stof(argv(2)));
+		bot = find_bot_by_number(stof(argv(1)));
 		if(bot == world)
-			bot = find_bot_by_name(argv(2));
+			bot = find_bot_by_name(argv(1));
 
 		if(bot)
 			bot_queuecommand(bot, strcat(argv(2), " ", argv(3)));



More information about the nexuiz-commits mailing list