Bot AI: fix broken aim direction when bot executes user commands such as bot_cmd...
authorterencehill <piuntn@gmail.com>
Thu, 29 Nov 2018 15:05:48 +0000 (16:05 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 29 Nov 2018 15:05:48 +0000 (16:05 +0100)
qcsrc/server/bot/default/havocbot/havocbot.qc

index bb6c15c528546b3b92863d621751eeaa1a9ec84f..1dfd72bf0d136fb9519a0e51c329dcbd0a5b77a6 100644 (file)
@@ -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;