summaryrefslogtreecommitdiff
path: root/src/water_cmd.cpp
diff options
context:
space:
mode:
authorYexo <yexo@openttd.org>2009-01-21 02:31:55 +0000
committerYexo <yexo@openttd.org>2009-01-21 02:31:55 +0000
commitdb3ee34b4468aa3448b64e339258760885c5d716 (patch)
tree272533ac91b7bc3ab16c3ee1a997e142f3170a2a /src/water_cmd.cpp
parent5e7669b539002cb9ec9e608f4601a827b5e9da57 (diff)
downloadopenttd-db3ee34b4468aa3448b64e339258760885c5d716.tar.xz
(svn r15190) -Feature: Allow terraforming of the tiles at the edges of the map.
Diffstat (limited to 'src/water_cmd.cpp')
-rw-r--r--src/water_cmd.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index 6735d2231..c24e8d500 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -358,9 +358,9 @@ static CommandCost ClearTile_Water(TileIndex tile, byte flags)
case WATER_TILE_CLEAR:
if (flags & DC_NO_WATER) return_cmd_error(STR_3807_CAN_T_BUILD_ON_WATER);
- /* Make sure it's not an edge tile. */
- if (!IsInsideMM(TileX(tile), 1, MapMaxX() - 1) ||
- !IsInsideMM(TileY(tile), 1, MapMaxY() - 1)) {
+ /* Make sure freeform edges are allowed or it's not an edge tile. */
+ if (!_settings_game.construction.freeform_edges && (!IsInsideMM(TileX(tile), 1, MapMaxX() - 1) ||
+ !IsInsideMM(TileY(tile), 1, MapMaxY() - 1))) {
return_cmd_error(STR_0002_TOO_CLOSE_TO_EDGE_OF_MAP);
}
@@ -905,7 +905,7 @@ static FloodingBehaviour GetFloodingBehaviour(TileIndex tile)
/**
* Floods a tile.
*/
-static void DoFloodTile(TileIndex target)
+void DoFloodTile(TileIndex target)
{
assert(!IsTileType(target, MP_WATER));