mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Merge pull request #4223 from vcmi/more_diagonal_roads
Route roads even further away from zone boundary
This commit is contained in:
commit
5f3394176c
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user