Bot AI: fix bots standing still for a few seconds after taking a dropped weapon
authorterencehill <piuntn@gmail.com>
Wed, 9 Oct 2019 21:36:06 +0000 (23:36 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 9 Oct 2019 21:36:57 +0000 (23:36 +0200)
qcsrc/server/bot/default/havocbot/havocbot.qc

index 4e32ce9..477d1ec 100644 (file)
@@ -90,7 +90,11 @@ void havocbot_ai(entity this)
        }
 
        if (this.goalcurrent && wasfreed(this.goalcurrent))
+       {
                navigation_clearroute(this);
+               navigation_goalrating_timeout_force(this);
+               return;
+       }
 
        if(IS_DEAD(this) || STAT(FROZEN, this))
        {