Fix bots not jumping to get out of lava and water (part 2)
authorterencehill <piuntn@gmail.com>
Mon, 13 Mar 2017 00:37:42 +0000 (01:37 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 13 Mar 2017 00:37:42 +0000 (01:37 +0100)
qcsrc/server/bot/default/havocbot/havocbot.qc

index 824d645..038aea0 100644 (file)
@@ -736,6 +736,7 @@ void havocbot_movetogoal(entity this)
                evadeobstacle = '0 0 0';
                evadelava = '0 0 0';
 
+               this.aistatus &= ~AI_STATUS_DANGER_AHEAD;
                makevectors(this.v_angle.y * '0 1 0');
                if (this.waterlevel)
                {
@@ -812,7 +813,6 @@ void havocbot_movetogoal(entity this)
 
                        // Check for water/slime/lava and dangerous edges
                        // (only when the bot is on the ground or jumping intentionally)
-                       this.aistatus &= ~AI_STATUS_DANGER_AHEAD;
 
                        vector dst_ahead = this.origin + this.view_ofs + offset;
                        vector dst_down = dst_ahead - '0 0 3000';