From: terencehill Date: Sat, 13 May 2017 20:22:01 +0000 (+0200) Subject: If for some reason a bot selects teleport/jumppad/warpzone origin as route destinatio... X-Git-Tag: xonotic-v0.8.5~2378^2~162 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=866ee9e66df7215467842264860c37628df8b795;p=xonotic%2Fxonotic-data.pk3dir.git If for some reason a bot selects teleport/jumppad/warpzone origin as route destination automatically add teleport/jumppad/warpzone destination to the route --- diff --git a/qcsrc/server/bot/default/navigation.qc b/qcsrc/server/bot/default/navigation.qc index 14d944623..59bc8dba8 100644 --- a/qcsrc/server/bot/default/navigation.qc +++ b/qcsrc/server/bot/default/navigation.qc @@ -928,6 +928,13 @@ bool navigation_routetogoal(entity this, entity e, vector startposition) if (!e) return false; + if(e.wpflags & WAYPOINTFLAG_TELEPORT) + { + // force teleport destination as route destination + e.wp00.enemy = e; + e = e.wp00; + } + this.goalentity = e; // put the entity on the goal stack