From 84af4c8fa898e60fc3b083828cb4308ee0efe50c Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 14 Sep 2017 16:45:32 +0200 Subject: [PATCH] Bot AI: immediately remove player as goal if dead and visible --- qcsrc/server/bot/default/navigation.qc | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 2.39.2