From: terencehill Date: Thu, 14 Sep 2017 14:45:32 +0000 (+0200) Subject: Bot AI: immediately remove player as goal if dead and visible X-Git-Tag: xonotic-v0.8.5~2378^2~58 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=84af4c8fa898e60fc3b083828cb4308ee0efe50c;p=xonotic%2Fxonotic-data.pk3dir.git Bot AI: immediately remove player as goal if dead and visible --- diff --git a/qcsrc/server/bot/default/navigation.qc b/qcsrc/server/bot/default/navigation.qc index 9bdcf8dba..b21670a06 100644 --- a/qcsrc/server/bot/default/navigation.qc +++ b/qcsrc/server/bot/default/navigation.qc @@ -1333,6 +1333,13 @@ bool navigation_routetogoal(entity this, entity e, vector startposition) int navigation_poptouchedgoals(entity this) { int removed_goals = 0; + + if(IS_PLAYER(this.goalcurrent) && IS_DEAD(this.goalcurrent) && checkpvs(this.origin + this.view_ofs, this.goalcurrent)) + { + navigation_poproute(this); + ++removed_goals; + } + if(this.goalcurrent.wpflags & WAYPOINTFLAG_TELEPORT) { // make sure jumppad is really hit, don't rely on distance based checks