diff options
author | tron <tron@openttd.org> | 2006-02-21 07:41:54 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-02-21 07:41:54 +0000 |
commit | b8b6084da29cf5b7d264d8baf485e0285164a7e2 (patch) | |
tree | 303bf7eabc1a6e7dca232689dd5a11219f226a6d /tunnelbridge_cmd.c | |
parent | 661bad903228a5b6948714d5f8469b4a13b7b27d (diff) | |
download | openttd-b8b6084da29cf5b7d264d8baf485e0285164a7e2.tar.xz |
(svn r3644) Don't use FindLandscapeHeightByTile() when it's overkill - often it was just a complicated way of writing GetTileSlope(tile, NULL)
Diffstat (limited to 'tunnelbridge_cmd.c')
-rw-r--r-- | tunnelbridge_cmd.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c index 00276c84d..42df5fbac 100644 --- a/tunnelbridge_cmd.c +++ b/tunnelbridge_cmd.c @@ -428,17 +428,17 @@ not_valid_below:; static bool DoCheckTunnelInWay(TileIndex tile, uint z, uint dir) { TileIndexDiff delta = TileOffsByDir(dir); - TileInfo ti; + uint height; do { tile -= delta; - FindLandscapeHeightByTile(&ti, tile); - } while (z < ti.z); + height = GetTileZ(tile); + } while (z < tile); - if (z == ti.z && - ti.type == MP_TUNNELBRIDGE && - GB(ti.map5, 4, 4) == 0 && - GB(ti.map5, 0, 2) == dir) { + if (z == tile && + IsTileType(tile, MP_TUNNELBRIDGE) && + GB(_m[tile].m5, 4, 4) == 0 && + GB(_m[tile].m5, 0, 2) == dir) { _error_message = STR_5003_ANOTHER_TUNNEL_IN_THE_WAY; return false; } |