From: terencehill Date: Fri, 17 Feb 2017 01:17:32 +0000 (+0100) Subject: Improve loose goal touching check when not running (useful to dumb bots like Lion) X-Git-Tag: xonotic-v0.8.2~202^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3d8f59ba7974cebd7e4796c84d0b80a10c5f0b7a;p=xonotic%2Fxonotic-data.pk3dir.git Improve loose goal touching check when not running (useful to dumb bots like Lion) --- 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;