X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fbot%2Fscripting.qc;h=63a6cb336d4054c90d3aa0283be057005139bed0;hb=fa0c6afce104a7e0afa9a40c5dc4b7b66d76fa22;hp=bcc4dc894fc890f55978696700758dca87375e94;hpb=2b2f4843f735c217616212640a58e88f5dc2a5f0;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/bot/scripting.qc b/qcsrc/server/bot/scripting.qc index bcc4dc894..63a6cb336 100644 --- a/qcsrc/server/bot/scripting.qc +++ b/qcsrc/server/bot/scripting.qc @@ -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"); } }