From 87706b876262cc304b11006c79612295d8cb9d38 Mon Sep 17 00:00:00 2001 From: terencehill Date: Mon, 31 Jul 2017 22:32:42 +0200 Subject: [PATCH] Make sure teleport/jumppad waypoints aren't improperly popped from the goal queue --- qcsrc/server/bot/default/navigation.qc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qcsrc/server/bot/default/navigation.qc b/qcsrc/server/bot/default/navigation.qc index 073943f4e..453b0930c 100644 --- a/qcsrc/server/bot/default/navigation.qc +++ b/qcsrc/server/bot/default/navigation.qc @@ -1337,6 +1337,8 @@ void navigation_poptouchedgoals(entity this) { LOG_DEBUG("path optimized for ", this.netname, ", removed a goal from the queue"); navigation_poproute(this); + if(this.goalcurrent && this.goalcurrent.wpflags & WAYPOINTFLAG_TELEPORT) + return; // TODO this may also be a nice idea to do "early" (e.g. by // manipulating the vlen() comparisons) to shorten paths in // general - this would make bots walk more "on rails" than @@ -1365,6 +1367,8 @@ void navigation_poptouchedgoals(entity this) } navigation_poproute(this); + if(this.goalcurrent && this.goalcurrent.wpflags & WAYPOINTFLAG_TELEPORT) + return; } } } @@ -1390,6 +1394,8 @@ void navigation_poptouchedgoals(entity this) } navigation_poproute(this); + if(this.goalcurrent && this.goalcurrent.wpflags & WAYPOINTFLAG_TELEPORT) + return; } } -- 2.39.2