1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

Merge pull request #4223 from vcmi/more_diagonal_roads

Route roads even further away from zone boundary
This commit is contained in:
Ivan Savenko
2024-07-05 15:45:28 +03:00
committed by GitHub

View File

@@ -87,8 +87,8 @@ bool RoadPlacer::createRoad(const int3 & destination)
{
ret *= VISITABLE_PENALTY;
}
float dist = border.distance(dst);
if(dist > 1)
float dist = border.distanceSqr(dst);
if(dist > 1.0f)
{
ret /= dist;
}