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
+2 -2
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;
}