diff options
Diffstat (limited to 'src/landscape.cpp')
-rw-r--r-- | src/landscape.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/landscape.cpp b/src/landscape.cpp index f09bdcaff..33afd5163 100644 --- a/src/landscape.cpp +++ b/src/landscape.cpp @@ -865,7 +865,8 @@ static void GenerateTerrain(int type, uint flag) uint x = r & MapMaxX(); uint y = (r >> MapLogX()) & MapMaxY(); - if (x < 2 || y < 2) return; + uint edge_distance = 1 + (_settings_game.construction.freeform_edges ? 1 : 0); + if (x <= edge_distance || y <= edge_distance) return; DiagDirection direction = (DiagDirection)GB(r, 22, 2); uint w = templ->width; @@ -900,8 +901,8 @@ static void GenerateTerrain(int type, uint flag) } } - if (x + w >= MapMaxX() - 1) return; - if (y + h >= MapMaxY() - 1) return; + if (x + w >= MapMaxX()) return; + if (y + h >= MapMaxY()) return; TileIndex tile = TileXY(x, y); |