summaryrefslogtreecommitdiff
path: root/train_cmd.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
commit0100871412ac1b48aa64a87f2d88d8276212963e (patch)
treefa4485d2814de5612a416a86e22ba7d60ce70f9f /train_cmd.c
parent7a0071cc531b7c3fe03293360acec28e889a4532 (diff)
downloadopenttd-0100871412ac1b48aa64a87f2d88d8276212963e.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 'train_cmd.c')
-rw-r--r--train_cmd.c3
1 files changed, 2 insertions, 1 deletions
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);
+ }
}
}