diff options
author | tron <tron@openttd.org> | 2006-06-10 21:06:29 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-06-10 21:06:29 +0000 |
commit | f664e3fafae949c2b66a69df36cd6b75abf17b79 (patch) | |
tree | dd560483e5dcb087be1c65558aa1f69589269232 | |
parent | 89f0033d97f06d199fd975c3eaa7eee852694ecd (diff) | |
download | openttd-f664e3fafae949c2b66a69df36cd6b75abf17b79.tar.xz |
(svn r5221) Make the assertion in SetTileType() more strict: "lower edge of map <=> VOID" instead of just "lower edge of map => VOID"
This works since the hack abusing SetTileType() in openttd.c is gone (r5171)
-rw-r--r-- | tile.h | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -59,11 +59,9 @@ static inline TileType GetTileType(TileIndex tile) static inline void SetTileType(TileIndex tile, TileType type) { assert(tile < MapSize()); - /* Allow only MP_VOID to be set to border tiles. This code is put here since - * it seems there is a bug that violates this somewhere. (Formely know as - * the "old ship pf" bug, which presented a case in which this broke). It - * can be removed as soon as the bug is squashed. */ - assert((TileX(tile) < MapMaxX() && TileY(tile) < MapMaxY()) || type == MP_VOID); + /* 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)); SB(_m[tile].type_height, 4, 4, type); } |