]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix bug in nearest waypoint search I introduced in 01376c61cd
authorterencehill <piuntn@gmail.com>
Mon, 13 Nov 2017 19:15:35 +0000 (20:15 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 13 Nov 2017 19:15:35 +0000 (20:15 +0100)
qcsrc/server/bot/default/navigation.qc

index c9ebc07550408ea28704823bdbc27304fd9ec09a..71666aacd2d72d85cf1df798060ab85f00d8ad5c 100644 (file)
@@ -967,7 +967,7 @@ entity navigation_findnearestwaypoint_withdist_except(entity ent, float walkfrom
                        tracewalk_dest, tracewalk_dest_height, walkfromwp, bestdist))
                {
                        if (walkfromwp)
-                               bestdist = vlen(tracewalk_dest - org);
+                               bestdist = vlen(tracewalk_dest - v);
                        else
                                bestdist = vlen(v - org);
                        best = it;