]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
If for some reason a bot selects teleport/jumppad/warpzone origin as route destinatio...
authorterencehill <piuntn@gmail.com>
Sat, 13 May 2017 20:22:01 +0000 (22:22 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 13 May 2017 20:49:53 +0000 (22:49 +0200)
qcsrc/server/bot/default/navigation.qc

index 14d944623c275931e1f1bb6e9db9ea4ff2351bf1..59bc8dba8350478f0cc5fae8dc9536a9d087dce7 100644 (file)
@@ -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