Initial support for rail custom bridge heads

This commit is contained in:
Jonathan G Rennison
2018-07-03 19:09:10 +01:00
parent 25af12814b
commit 77362b829a
25 changed files with 1055 additions and 235 deletions

View File

@@ -103,7 +103,7 @@ static TrackBits GetRailTrackBitsUniversal(TileIndex t, byte *override)
if (override != NULL && (IsTunnel(t) || GetTunnelBridgeLength(t, GetOtherBridgeEnd(t)) > 0)) {
*override = 1 << GetTunnelBridgeDirection(t);
}
return DiagDirToDiagTrackBits(GetTunnelBridgeDirection(t));
return GetTunnelBridgeTrackBits(t);
case MP_ROAD:
if (!IsLevelCrossing(t)) return TRACK_BIT_NONE;
@@ -199,6 +199,8 @@ static void AdjustTileh(TileIndex tile, Slope *tileh)
if (IsTileType(tile, MP_TUNNELBRIDGE)) {
if (IsTunnel(tile)) {
*tileh = SLOPE_STEEP; // XXX - Hack to make tunnel entrances to always have a pylon
} else if (IsRailCustomBridgeHeadTile(tile)) {
/* no change */
} else if (*tileh != SLOPE_FLAT) {
*tileh = SLOPE_FLAT;
} else {