]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix a loop not working as intended
authorterencehill <piuntn@gmail.com>
Thu, 28 Jun 2018 13:40:53 +0000 (15:40 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 28 Jun 2018 13:40:53 +0000 (15:40 +0200)
qcsrc/common/gamemodes/gamemode/assault/assault.qc

index 82af283d634e04be984f8a5e046fac2d22894b55..cee250cca383396557ab0e248ad3e46a35942601 100644 (file)
@@ -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),
                        {