From: mand1nga Date: Sun, 7 Aug 2011 21:06:07 +0000 (-0300) Subject: Fix waypoint lookup on the waypoint hardwiring code X-Git-Tag: xonotic-v0.5.0~148^2~15 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bbf7625266c11f17acd42a6485689a9e3e0d7ee1;p=xonotic%2Fxonotic-data.pk3dir.git Fix waypoint lookup on the waypoint hardwiring code --- diff --git a/qcsrc/server/bot/waypoints.qc b/qcsrc/server/bot/waypoints.qc index d2db7cd23..2fe2a09d7 100644 --- a/qcsrc/server/bot/waypoints.qc +++ b/qcsrc/server/bot/waypoints.qc @@ -23,7 +23,7 @@ entity waypoint_spawn(vector m1, vector m2, float f) setsize(w, m1 - w.origin, m2 - w.origin); if (vlen(w.size) > 0) w.wpisbox = TRUE; - + if(!w.wpisbox) { setsize(w, PL_MIN - '1 1 0', PL_MAX + '1 1 0'); @@ -496,11 +496,11 @@ void waypoint_load_links_hardwired() // Search "from" waypoint if(wp_from.origin!=wp_from_pos) { - wp_from = findradius(wp_from_pos, 1); + wp_from = findradius(wp_from_pos, 5); found = FALSE; while(wp_from) { - if(vlen(wp_from.origin-wp_from_pos)<1) + if(vlen(wp_from.origin-wp_from_pos)<5) if(wp_from.classname == "waypoint") { found = TRUE; @@ -517,11 +517,11 @@ void waypoint_load_links_hardwired() } // Search "to" waypoint - wp_to = findradius(wp_to_pos, 1); + wp_to = findradius(wp_to_pos, 5); found = FALSE; while(wp_to) { - if(vlen(wp_to.origin-wp_to_pos)<1) + if(vlen(wp_to.origin-wp_to_pos)<5) if(wp_to.classname == "waypoint") { found = TRUE;