]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/scripting.qc
Merge remote branch 'origin/master' into mirceakitsune/damage_effects
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / scripting.qc
index bcc4dc894fc890f55978696700758dca87375e94..63a6cb336d4054c90d3aa0283be057005139bed0 100644 (file)
@@ -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");
                }
        }