From ad1bf970a1dbbfa0f426660a88077f023681a3bd Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 28 Jun 2018 15:40:53 +0200 Subject: [PATCH] Fix a loop not working as intended --- qcsrc/common/gamemodes/gamemode/assault/assault.qc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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), { -- 2.39.2