1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00

Fix distance check

(cherry picked from commit 319f289dc4)
This commit is contained in:
Tomasz Zieliński 2023-04-10 10:00:24 +02:00
parent 64adc9983d
commit 3f83eaafc4

View File

@ -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;
}
}
}
}