diff --git a/lib/rmg/CZonePlacer.cpp b/lib/rmg/CZonePlacer.cpp index 6f5a348f8..e43e6374f 100644 --- a/lib/rmg/CZonePlacer.cpp +++ b/lib/rmg/CZonePlacer.cpp @@ -306,15 +306,14 @@ void CZonePlacer::placeOnGrid(CRandomGenerator* rand) } distance += localDistance; - - if (distance > maxDistance) - { - distance = maxDistance; - mostDistantPlace = potentialPos; - } } } } + if (distance > maxDistance) + { + maxDistance = distance; + mostDistantPlace = potentialPos; + } } } }