diff options
author | tron <tron@openttd.org> | 2006-03-12 15:04:03 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-03-12 15:04:03 +0000 |
commit | 78083f0da7b7c94eccea15eec397e2afe96da1d5 (patch) | |
tree | fa4485d2814de5612a416a86e22ba7d60ce70f9f /train_cmd.c | |
parent | b394f72fa9305094ddf672564a0f4a0c8f16e89b (diff) | |
download | openttd-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 'train_cmd.c')
-rw-r--r-- | train_cmd.c | 3 |
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); + } } } |