summaryrefslogtreecommitdiff
path: root/landscape.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-01-24 18:57:16 +0000
committertron <tron@openttd.org>2005-01-24 18:57:16 +0000
commitce01ed4e103936924a6483058c4058d65d940be7 (patch)
treec313958d17e6f250832f58cff6aa6651ef30ec5d /landscape.c
parent879ca660419f1137253cc7f9063e9babb8deb0f6 (diff)
downloadopenttd-ce01ed4e103936924a6483058c4058d65d940be7.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...
Diffstat (limited to 'landscape.c')
-rw-r--r--landscape.c7
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