diff options
author | tron <tron@openttd.org> | 2005-01-24 18:57:16 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-01-24 18:57:16 +0000 |
commit | 7f14b6902266e78e48adba806d9ac22fc42410c6 (patch) | |
tree | c313958d17e6f250832f58cff6aa6651ef30ec5d | |
parent | 6e2abeba5e63496a138f04df72454f2e0dbb8852 (diff) | |
download | openttd-7f14b6902266e78e48adba806d9ac22fc42410c6.tar.xz |
(svn r1641) Remove a boundary check added in r1332 to work around a bug - the real cause has been eleminated in r1413.
Leave an assert() just to be sure...
-rw-r--r-- | landscape.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/landscape.c b/landscape.c index e977e15e3..4dfe9953e 100644 --- a/landscape.c +++ b/landscape.c @@ -445,11 +445,8 @@ void SetMapExtraBits(uint tile, byte bits) uint GetMapExtraBits(uint tile) { - if (TileX(tile) < MapSizeX() && TileY(tile) < MapSizeY() && - TileX(tile) > 0 && TileY(tile) > 0) - return (_map_extra_bits[tile >> 2] >> (tile&3)*2)&3; - else - return 0; + assert(tile < MapSize()); + return (_map_extra_bits[tile >> 2] >> (tile & 3) * 2) & 3; } #define TILELOOP_BITS 4 |