diff options
author | Yexo <Yexo@openttd.org> | 2009-01-21 02:31:55 +0000 |
---|---|---|
committer | Yexo <Yexo@openttd.org> | 2009-01-21 02:31:55 +0000 |
commit | e3c69b7c4ebebba0aa85ef41ff6627705acb1db5 (patch) | |
tree | 272533ac91b7bc3ab16c3ee1a997e142f3170a2a /src/tile_map.cpp | |
parent | 470437df70d63b2c44ce34d408b6820cfa446aed (diff) | |
download | openttd-e3c69b7c4ebebba0aa85ef41ff6627705acb1db5.tar.xz |
(svn r15190) -Feature: Allow terraforming of the tiles at the edges of the map.
Diffstat (limited to 'src/tile_map.cpp')
-rw-r--r-- | src/tile_map.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tile_map.cpp b/src/tile_map.cpp index 4f6ea17d6..c8977d6d1 100644 --- a/src/tile_map.cpp +++ b/src/tile_map.cpp @@ -16,8 +16,9 @@ Slope GetTileSlope(TileIndex tile, uint *h) { assert(tile < MapSize()); - if (TileX(tile) == MapMaxX() || TileY(tile) == MapMaxY()) { - if (h != NULL) *h = 0; + if (TileX(tile) == MapMaxX() || TileY(tile) == MapMaxY() || + (_settings_game.construction.freeform_edges && (TileX(tile) == 0 || TileY(tile) == 0))) { + if (h != NULL) *h = TileHeight(tile) * TILE_HEIGHT; return SLOPE_FLAT; } |