From d4612d7eb9d5f85ffd1efa6ef5b58df3a86bd4d8 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sun, 28 Aug 2011 21:44:51 +0200 Subject: [PATCH] obvious bugfixes :P --- qcsrc/server/bot/waypoints.qc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qcsrc/server/bot/waypoints.qc b/qcsrc/server/bot/waypoints.qc index a214c660e..2214fed4d 100644 --- a/qcsrc/server/bot/waypoints.qc +++ b/qcsrc/server/bot/waypoints.qc @@ -945,10 +945,10 @@ float botframe_autowaypoints_fix_from(entity p, float walkfromwp, entity wp, .en w = find(world, classname, "waypoint"); while (w) { - if(w != wp) + if(w != wp && !(w.wpflags & WAYPOINTFLAG_NORELINK)) { float d; - d = vlen(wp.origin - w.origin) + vlen(w.origin + porg); + d = vlen(wp.origin - w.origin) + vlen(w.origin - porg); if(d < bestdist) if(navigation_waypoint_will_link(wp.origin, w.origin, p, walkfromwp, 1050)) if(navigation_waypoint_will_link(w.origin, porg, p, walkfromwp, 1050)) @@ -961,7 +961,7 @@ float botframe_autowaypoints_fix_from(entity p, float walkfromwp, entity wp, .en } if(bestdist < maxdist) { - print("update chain from ", etos(p.fld), " to new nearest WP ", etos(p.fld), "\n"); + print("update chain to new nearest WP ", etos(p.fld), "\n"); return 0; } -- 2.39.2