Forráskód Böngészése

Route roads even further away from zone boundary

Tomasz Zieliński 1 éve
szülő
commit
5b99974d31
1 módosított fájl, 2 hozzáadás és 2 törlés
  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;
 			}