tile.h
changeset 2900 a15ccc6a9b39
parent 2493 f6b4300cc2b0
child 3099 571719b2cee3
--- a/tile.h	Sat Jan 28 01:33:57 2006 +0000
+++ b/tile.h	Sat Jan 28 09:45:25 2006 +0000
@@ -89,6 +89,11 @@
 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);
 	SB(_m[tile].type_height, 4, 4, type);
 }