]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Bot AI: don't consider an item reachable just because it overlaps a teleport waypoint...
authorterencehill <piuntn@gmail.com>
Tue, 17 Jul 2018 14:09:26 +0000 (16:09 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 17 Jul 2018 14:09:26 +0000 (16:09 +0200)
qcsrc/server/bot/default/navigation.qc

index cb003dbd3c630af77c2e19feee66f84509852fa7..250b7cb09c639e45680e699514958d769b97a686 100644 (file)
@@ -916,7 +916,7 @@ entity navigation_findnearestwaypoint_withdist_except(entity ent, float walkfrom
        vector pm2 = ent.origin + ent.maxs;
 
        // do two scans, because box test is cheaper
-       IL_EACH(g_waypoints, it != ent && it != except,
+       IL_EACH(g_waypoints, it != ent && it != except && !(it.wpflags & WAYPOINTFLAG_TELEPORT),
        {
                if(boxesoverlap(pm1, pm2, it.absmin, it.absmax))
                {