(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

This commit is contained in:
tron
2006-03-12 15:04:03 +00:00
parent b394f72fa9
commit 78083f0da7
14 changed files with 61 additions and 68 deletions

View File

@@ -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);
}
}
}