From 0100871412ac1b48aa64a87f2d88d8276212963e Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 12 Mar 2006 15:04:03 +0000 Subject: (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 --- train_cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'train_cmd.c') diff --git a/train_cmd.c b/train_cmd.c index fa24f4cbd..bc2f28c57 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -2481,8 +2481,9 @@ static byte AfterSetTrainPos(Vehicle *v, bool new_tile) TileIndex tile = TileVirtXY(v->x_pos, v->y_pos); // XXX workaround, whole UP/DOWN detection needs overhaul - if (!IsTileType(tile, MP_TUNNELBRIDGE) || (_m[tile].m5 & 0x80) != 0) + if (!IsTunnelTile(tile)) { SETBIT(v->u.rail.flags, (new_z > old_z) ? VRF_GOINGUP : VRF_GOINGDOWN); + } } } -- cgit v1.2.3-54-g00ecf