Bot AI: clear current route if goalcurrent has been freed; it should avoid occasional...
authorterencehill <piuntn@gmail.com>
Wed, 4 Sep 2019 20:28:04 +0000 (22:28 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 4 Sep 2019 20:28:04 +0000 (22:28 +0200)
qcsrc/server/bot/default/havocbot/havocbot.qc

index 6f257a9..d055fc9 100644 (file)
@@ -89,6 +89,9 @@ void havocbot_ai(entity this)
                bot_strategytoken_taken = true;
        }
 
+       if (this.goalcurrent && wasfreed(this.goalcurrent))
+               navigation_clearroute(this);
+
        if(IS_DEAD(this) || STAT(FROZEN, this))
        {
                if (this.goalcurrent)