]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 6f257a9ca3ccf7b183d7122bec5af0b79bf7fd42..d055fc962b7a25e5100c71b2b66898bb9d485647 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)