From: terencehill Date: Mon, 25 Sep 2017 21:12:27 +0000 (+0200) Subject: Fix links from waypoints to items getting tested in the wrong direction before adding... X-Git-Tag: xonotic-v0.8.5~2378^2~51 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=58e50cc44d85d4dd3f49cf081402a0564a6812b7;p=xonotic%2Fxonotic-data.pk3dir.git Fix links from waypoints to items getting tested in the wrong direction before adding them --- diff --git a/qcsrc/server/bot/default/navigation.qc b/qcsrc/server/bot/default/navigation.qc index cfe4320f9..6c48bfd5a 100644 --- a/qcsrc/server/bot/default/navigation.qc +++ b/qcsrc/server/bot/default/navigation.qc @@ -805,9 +805,9 @@ entity navigation_findnearestwaypoint_withdist_except(entity ent, float walkfrom if(walkfromwp && (it.wpflags & WAYPOINTFLAG_NORELINK)) continue; - SET_TRACEWALK_DESTCOORDS(it, org, v2, v2_height); - if(vdist(v2 - org, <, 1050)) - if(tracewalk(ent, org, PL_MIN_CONST, PL_MAX_CONST, v2, v2_height, bot_navigation_movemode)) + SET_TRACEWALK_DESTCOORDS(ent, it.origin, v2, v2_height); + if(vdist(v2 - it.origin, <, 1050)) + if(tracewalk(ent, it.origin, PL_MIN_CONST, PL_MAX_CONST, v2, v2_height, bot_navigation_movemode)) navigation_item_addlink(it, ent); }); }