From: terencehill Date: Fri, 28 Apr 2017 16:35:28 +0000 (+0200) Subject: Fix a bug in botframe_updatedangerousobjects; simplify some code X-Git-Tag: xonotic-v0.8.5~2378^2~176 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=27d5c464e95a08d6f75a7d0effa2751ed96d8b9a;p=xonotic%2Fxonotic-data.pk3dir.git Fix a bug in botframe_updatedangerousobjects; simplify some code --- diff --git a/qcsrc/server/bot/default/navigation.qc b/qcsrc/server/bot/default/navigation.qc index e1debd404..d3f6752e4 100644 --- a/qcsrc/server/bot/default/navigation.qc +++ b/qcsrc/server/bot/default/navigation.qc @@ -661,16 +661,9 @@ void navigation_markroutes_inverted(entity fixed_source_waypoint) cost = it.wpcost; // cost to walk from it to home p = it.wpnearestpoint; entity wp = it; - IL_EACH(g_waypoints, true, + IL_EACH(g_waypoints, it != wp, { - if(wp != it.wp00) if(wp != it.wp01) if(wp != it.wp02) if(wp != it.wp03) - if(wp != it.wp04) if(wp != it.wp05) if(wp != it.wp06) if(wp != it.wp07) - if(wp != it.wp08) if(wp != it.wp09) if(wp != it.wp10) if(wp != it.wp11) - if(wp != it.wp12) if(wp != it.wp13) if(wp != it.wp14) if(wp != it.wp15) - if(wp != it.wp16) if(wp != it.wp17) if(wp != it.wp18) if(wp != it.wp19) - if(wp != it.wp20) if(wp != it.wp21) if(wp != it.wp22) if(wp != it.wp23) - if(wp != it.wp24) if(wp != it.wp25) if(wp != it.wp26) if(wp != it.wp27) - if(wp != it.wp28) if(wp != it.wp29) if(wp != it.wp30) if(wp != it.wp31) + if(!waypoint_islinked(it, wp)) continue; cost2 = cost + it.dmg; navigation_markroutes_checkwaypoint(wp, it, cost2, p); @@ -1079,8 +1072,8 @@ void botframe_updatedangerousobjects(float maxupdate) IL_EACH(g_waypoints, true, { danger = 0; - m1 = it.mins; - m2 = it.maxs; + m1 = it.absmin; + m2 = it.absmax; IL_EACH(g_bot_dodge, it.bot_dodge, { v = it.origin;