Browse Source

Merge pull request #4223 from vcmi/more_diagonal_roads

Route roads even further away from zone boundary
Ivan Savenko 1 year ago
parent
commit
5f3394176c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/rmg/modificators/RoadPlacer.cpp

+ 2 - 2
lib/rmg/modificators/RoadPlacer.cpp

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