summaryrefslogtreecommitdiff
path: root/src/tile_map.h
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/tile_map.h
parent5e7669b539002cb9ec9e608f4601a827b5e9da57 (diff)
downloadopenttd-db3ee34b4468aa3448b64e339258760885c5d716.tar.xz
(svn r15190) -Feature: Allow terraforming of the tiles at the edges of the map.
Diffstat (limited to 'src/tile_map.h')
-rw-r--r--src/tile_map.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tile_map.h b/src/tile_map.h
index f9ce5ddc9..bd67279a6 100644
--- a/src/tile_map.h
+++ b/src/tile_map.h
@@ -10,6 +10,7 @@
#include "company_type.h"
#include "map_func.h"
#include "core/bitmath_func.hpp"
+#include "settings_type.h"
/**
* Returns the height of a tile
@@ -87,8 +88,9 @@ static inline void SetTileType(TileIndex tile, TileType type)
{
assert(tile < MapSize());
/* VOID tiles (and no others) are exactly allowed at the lower left and right
- * edges of the map */
- assert((TileX(tile) == MapMaxX() || TileY(tile) == MapMaxY()) == (type == MP_VOID));
+ * edges of the map. If _settings_game.construction.freeform_edges is true,
+ * the upper edges of the map are also VOID tiles. */
+ assert((TileX(tile) == MapMaxX() || TileY(tile) == MapMaxY() || (_settings_game.construction.freeform_edges && (TileX(tile) == 0 || TileY(tile) == 0))) == (type == MP_VOID));
SB(_m[tile].type_height, 4, 4, type);
}