From: terencehill Date: Thu, 28 Jun 2018 13:40:53 +0000 (+0200) Subject: Fix a loop not working as intended X-Git-Tag: xonotic-v0.8.5~1923^2~13 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ad1bf970a1dbbfa0f426660a88077f023681a3bd;p=xonotic%2Fxonotic-data.pk3dir.git Fix a loop not working as intended --- diff --git a/qcsrc/common/gamemodes/gamemode/assault/assault.qc b/qcsrc/common/gamemodes/gamemode/assault/assault.qc index 82af283d6..cee250cca 100644 --- a/qcsrc/common/gamemodes/gamemode/assault/assault.qc +++ b/qcsrc/common/gamemodes/gamemode/assault/assault.qc @@ -426,9 +426,9 @@ void havocbot_goalrating_ast_targets(entity this, float ratingscale) // Find and rate waypoints around it found = false; entity best = NULL; - float bestvalue = 99999999999; + float bestvalue = FLOAT_MAX; entity des = it; - for(float radius = 0; radius < 1500 && !found; radius += 500) + for (float radius = 500; radius <= 1500 && !found; radius += 500) { FOREACH_ENTITY_RADIUS(p, radius, it.classname == "waypoint" && !(it.wpflags & WAYPOINTFLAG_GENERATED), {