From: terencehill Date: Mon, 22 May 2017 13:25:47 +0000 (+0200) Subject: Fix navigation_findnearestwaypoint improperly testing if a teleport/warpzone/jumppad... X-Git-Tag: xonotic-v0.8.5~2378^2~148 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c2349948123cd3ff49676fc310c10b0fb676aefe;p=xonotic%2Fxonotic-data.pk3dir.git Fix navigation_findnearestwaypoint improperly testing if a teleport/warpzone/jumppad waypoint can be linked to an item or player. It's also good as optimization --- diff --git a/qcsrc/server/bot/default/navigation.qc b/qcsrc/server/bot/default/navigation.qc index 891ad3c15..4598d01ba 100644 --- a/qcsrc/server/bot/default/navigation.qc +++ b/qcsrc/server/bot/default/navigation.qc @@ -454,6 +454,9 @@ entity navigation_findnearestwaypoint_withdist_except(entity ent, float walkfrom waypoint_clearlinks(ent); // initialize wpXXmincost fields IL_EACH(g_waypoints, it != ent, { + if(walkfromwp && (it.wpflags & WAYPOINTFLAG_NORELINK)) + continue; + if(it.wpisbox) { vector wm1 = it.absmin; @@ -472,6 +475,9 @@ entity navigation_findnearestwaypoint_withdist_except(entity ent, float walkfrom // box check failed, try walk IL_EACH(g_waypoints, it != ent, { + if(walkfromwp && (it.wpflags & WAYPOINTFLAG_NORELINK)) + continue; + if(it.wpisbox) { vector wm1 = it.origin + it.mins;