]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix links from waypoints to items getting tested in the wrong direction before adding...
authorterencehill <piuntn@gmail.com>
Mon, 25 Sep 2017 21:12:27 +0000 (23:12 +0200)
committerterencehill <piuntn@gmail.com>
Mon, 25 Sep 2017 21:12:27 +0000 (23:12 +0200)
qcsrc/server/bot/default/navigation.qc

index cfe4320f97486bde54d6e92b701fb1add80f4881..6c48bfd5a5bd6fdb9feeee77f2bda90cd4f4a8f7 100644 (file)
@@ -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);
                });
        }