diff options
author | zuu <zuu@openttd.org> | 2013-10-12 22:07:58 +0000 |
---|---|---|
committer | zuu <zuu@openttd.org> | 2013-10-12 22:07:58 +0000 |
commit | dfb566331390a87f01d048f57ed6d51b2f329d65 (patch) | |
tree | 76bcf6959e2acb63051f9f74a80b8154b95bc824 /src/clear_cmd.cpp | |
parent | b35b8aa5bb38f9e47ca04ccd9302dd82546de0cd (diff) | |
download | openttd-dfb566331390a87f01d048f57ed6d51b2f329d65.tar.xz |
(svn r25849) -Codechange: Introduce IsTileFlat to not compute full slope information for situations when we only want to know if a tile is flat or not (cirdan, LordAro)
Diffstat (limited to 'src/clear_cmd.cpp')
-rw-r--r-- | src/clear_cmd.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/clear_cmd.cpp b/src/clear_cmd.cpp index 46598866f..858197c91 100644 --- a/src/clear_cmd.cpp +++ b/src/clear_cmd.cpp @@ -249,8 +249,7 @@ static void TileLoop_Clear(TileIndex tile) /* If the tile is at any edge flood it to prevent maps without water. */ if (_settings_game.construction.freeform_edges && DistanceFromEdge(tile) == 1) { int z; - Slope slope = GetTileSlope(tile, &z); - if (z == 0 && slope == SLOPE_FLAT) { + if (IsTileFlat(tile, &z) && z == 0) { DoFloodTile(tile); MarkTileDirtyByTile(tile); return; |