From 3d8f59ba7974cebd7e4796c84d0b80a10c5f0b7a Mon Sep 17 00:00:00 2001 From: terencehill Date: Fri, 17 Feb 2017 02:17:32 +0100 Subject: [PATCH] Improve loose goal touching check when not running (useful to dumb bots like Lion) --- qcsrc/server/bot/default/navigation.qc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/qcsrc/server/bot/default/navigation.qc b/qcsrc/server/bot/default/navigation.qc index 0883bacd0..2cfc6d33a 100644 --- a/qcsrc/server/bot/default/navigation.qc +++ b/qcsrc/server/bot/default/navigation.qc @@ -985,8 +985,18 @@ void navigation_poptouchedgoals(entity this) } } - while (this.goalcurrent && !IS_PLAYER(this.goalcurrent) && boxesoverlap(m1, m2, this.goalcurrent.absmin, this.goalcurrent.absmax)) + while (this.goalcurrent && !IS_PLAYER(this.goalcurrent)) { + vector gc_min = this.goalcurrent.absmin; + vector gc_max = this.goalcurrent.absmax; + if(this.goalcurrent.classname == "waypoint") + { + gc_min = this.goalcurrent.origin - '1 1 1' * 12; + gc_max = this.goalcurrent.origin + '1 1 1' * 12; + } + if(!boxesoverlap(m1, m2, gc_min, gc_max)) + break; + if((this.goalcurrent.wpflags & WAYPOINTFLAG_TELEPORT)) break; -- 2.39.2