]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Clear current bot route as soon as bot dies or gets frozen
authorterencehill <piuntn@gmail.com>
Thu, 2 Nov 2017 16:58:58 +0000 (17:58 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 2 Nov 2017 16:58:58 +0000 (17:58 +0100)
qcsrc/server/bot/default/havocbot/havocbot.qc

index 86826f6b6f36dfa5388be732eabe777041ce53d2..cf4136c6eca969f35224cef869248b11913787ab 100644 (file)
@@ -85,7 +85,11 @@ void havocbot_ai(entity this)
        }
 
        if(IS_DEAD(this) || STAT(FROZEN, this))
        }
 
        if(IS_DEAD(this) || STAT(FROZEN, this))
+       {
+               if (this.goalcurrent)
+                       navigation_clearroute(this);
                return;
                return;
+       }
 
        havocbot_chooseenemy(this);
 
 
        havocbot_chooseenemy(this);