From c329c40a3e9a0487505c87286671cfdcb5cae8bf Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 29 Nov 2018 16:05:48 +0100 Subject: [PATCH] Bot AI: fix broken aim direction when bot executes user commands such as bot_cmd 1 moveto 'x y z' --- qcsrc/server/bot/default/havocbot/havocbot.qc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qcsrc/server/bot/default/havocbot/havocbot.qc b/qcsrc/server/bot/default/havocbot/havocbot.qc index bb6c15c52..1dfd72bf0 100644 --- a/qcsrc/server/bot/default/havocbot/havocbot.qc +++ b/qcsrc/server/bot/default/havocbot/havocbot.qc @@ -31,6 +31,8 @@ void havocbot_ai(entity this) if(this.draggedby) return; + this.bot_aimdir_executed = false; + if(bot_execute_commands(this)) return; @@ -106,8 +108,6 @@ void havocbot_ai(entity this) havocbot_aim(this); lag_update(this); - this.bot_aimdir_executed = false; - if (this.bot_aimtarg) { this.aistatus |= AI_STATUS_ATTACKING; -- 2.39.2