From: Mario Date: Thu, 23 Jun 2016 17:28:11 +0000 (+1000) Subject: Fix a warning on map load X-Git-Tag: xonotic-v0.8.2~700^2~135 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d998b4fe8d146d6280bab078306707fb0d29aa9e;p=xonotic%2Fxonotic-data.pk3dir.git Fix a warning on map load --- diff --git a/qcsrc/server/bot/waypoints.qc b/qcsrc/server/bot/waypoints.qc index 6f45ef6c8..58bb0b46b 100644 --- a/qcsrc/server/bot/waypoints.qc +++ b/qcsrc/server/bot/waypoints.qc @@ -19,11 +19,12 @@ entity waypoint_spawn(vector m1, vector m2, float f) { if(!(f & WAYPOINTFLAG_PERSONAL)) { - FOREACH_ENTITY_CLASS("waypoint", boxesoverlap(m1, m2, it.absmin, it.absmax), + for(entity wp = findchain(classname, "waypoint"); wp; wp = wp.chain) { // if a matching spawnfunc_waypoint already exists, don't add a duplicate - return it; - }); + if(boxesoverlap(m1, m2, wp.absmin, wp.absmax)) + return wp; + } }