summaryrefslogtreecommitdiff
path: root/tunnel_map.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-12 15:04:03 +0000
committertron <tron@openttd.org>2006-03-12 15:04:03 +0000
commit78083f0da7b7c94eccea15eec397e2afe96da1d5 (patch)
treefa4485d2814de5612a416a86e22ba7d60ce70f9f /tunnel_map.c
parentb394f72fa9305094ddf672564a0f4a0c8f16e89b (diff)
downloadopenttd-78083f0da7b7c94eccea15eec397e2afe96da1d5.tar.xz
(svn r3830) Move IsTunnelTile() from tile.h to tunnel_map.h and add IsTunnel(), which just checks for a tunnel, but not the tile type as IsTunnelTile() does
Diffstat (limited to 'tunnel_map.c')
-rw-r--r--tunnel_map.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tunnel_map.c b/tunnel_map.c
index 8752d8107..435d62f20 100644
--- a/tunnel_map.c
+++ b/tunnel_map.c
@@ -15,8 +15,7 @@ TileIndex GetOtherTunnelEnd(TileIndex tile)
do {
tile += delta;
} while (
- !IsTileType(tile, MP_TUNNELBRIDGE) ||
- GB(_m[tile].m5, 4, 4) != 0 ||
+ !IsTunnelTile(tile) ||
GetTunnelDirection(tile) != dir ||
GetTileZ(tile) != z
);
@@ -37,8 +36,7 @@ static bool IsTunnelInWayDir(TileIndex tile, uint z, DiagDirection dir)
return
z == height &&
- IsTileType(tile, MP_TUNNELBRIDGE) &&
- GB(_m[tile].m5, 4, 4) == 0 &&
+ IsTunnelTile(tile) &&
GetTunnelDirection(tile) == dir;
}