]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/scripting.qc
Merge remote branch 'origin/terencehill/powerups_respawntime_fix'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / scripting.qc
index 6b1eba8277d9cc9f8ab7ccc6b65d765ef387137b..63a6cb336d4054c90d3aa0283be057005139bed0 100644 (file)
@@ -494,7 +494,7 @@ void bot_list_commands()
                bot_commands_init();
 
        print("List of all available commands:\n");
-       print(" Command\t\t\t\tParameter Type\n");
+       print("  Command - Parameter Type\n");
 
        for(i=1;i<BOT_CMD_COUNTER;++i)
        {
@@ -513,7 +513,7 @@ void bot_list_commands()
                                ptype = "none";
                                break;
                }
-               print(strcat(" ",bot_cmd_string[i],"\t\t\t\t<",ptype,"> \n"));
+               print(strcat("  ",bot_cmd_string[i]," - <",ptype,"> \n"));
        }
 }
 
@@ -799,18 +799,18 @@ float bot_cmd_aim()
 
        tokens = tokenizebyseparator(parms, " ");
 
-       if(tokens==2)
+       if(tokens<2||tokens>3)
+               return CMD_STATUS_ERROR;
+
+       step = (tokens == 3) ? stof(argv(2)) : 0;
+
+       if(step == 0)
        {
                self.v_angle_x -= stof(argv(1));
                self.v_angle_y += stof(argv(0));
                return CMD_STATUS_FINISHED;
        }
 
-       if(tokens<2||tokens>3)
-               return CMD_STATUS_ERROR;
-
-       step = stof(argv(2));
-
        self.bot_cmd_aim_begin = self.v_angle;
 
        self.bot_cmd_aim_end_x = self.v_angle_x - stof(argv(1));
@@ -1106,7 +1106,7 @@ float bot_cmd_debug_assert_canfire()
                if(f)
                {
                        self.colormod = '0 8 8';
-                       print("Bot wants to fire, inhibited by weaponentity state\n");
+                       print("Bot ", self.netname, " using ", self.weaponname, " wants to fire, inhibited by weaponentity state\n");
                }
        }
        else if(ATTACK_FINISHED(self) > time)
@@ -1114,7 +1114,7 @@ float bot_cmd_debug_assert_canfire()
                if(f)
                {
                        self.colormod = '8 0 8';
-                       print("Bot wants to fire, inhibited by ATTACK_FINISHED\n");
+                       print("Bot ", self.netname, " using ", self.weaponname, " wants to fire, inhibited by ATTACK_FINISHED (", ftos(ATTACK_FINISHED(self) - time), " seconds left)\n");
                }
        }
        else if(self.tuba_note)
@@ -1122,7 +1122,7 @@ float bot_cmd_debug_assert_canfire()
                if(f)
                {
                        self.colormod = '8 0 0';
-                       print("Bot wants to fire, bot still has an active tuba note\n");
+                       print("Bot ", self.netname, " using ", self.weaponname, " wants to fire, bot still has an active tuba note\n");
                }
        }
        else
@@ -1130,7 +1130,7 @@ float bot_cmd_debug_assert_canfire()
                if(!f)
                {
                        self.colormod = '8 8 0';
-                       print("Bot thinks it has fired, but apparently did not\n");
+                       print("Bot ", self.netname, " using ", self.weaponname, " thinks it has fired, but apparently did not; ATTACK_FINISHED says ", ftos(ATTACK_FINISHED(self) - time), " seconds left\n");
                }
        }