mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r24837) -Fix: Don't consider blocked rail station tiles that display wires as non-reachable for masking out unnecessary catenary wires.
This commit is contained in:
parent
cf570106a6
commit
0d331c8d8e
|
@ -129,9 +129,13 @@ static TrackBits MaskWireBits(TileIndex t, TrackBits tracks)
|
||||||
for (DiagDirection d = DIAGDIR_BEGIN; d < DIAGDIR_END; d++) {
|
for (DiagDirection d = DIAGDIR_BEGIN; d < DIAGDIR_END; d++) {
|
||||||
/* If the neighbor tile is either not electrified or has no tracks that can be reached
|
/* If the neighbor tile is either not electrified or has no tracks that can be reached
|
||||||
* from this tile, mark all trackdirs that can be reached from the neighbour tile
|
* from this tile, mark all trackdirs that can be reached from the neighbour tile
|
||||||
* as needing no catenary. */
|
* as needing no catenary. We make an exception for blocked station tiles with a matching
|
||||||
RailType rt = GetTileRailType(TileAddByDiagDir(t, d));
|
* axis that still display wires to preserve visual continuity. */
|
||||||
if (rt == INVALID_RAILTYPE || !HasCatenary(rt) || (TrackStatusToTrackBits(GetTileTrackStatus(TileAddByDiagDir(t, d), TRANSPORT_RAIL, 0)) & DiagdirReachesTracks(d)) == TRACK_BIT_NONE) {
|
TileIndex next_tile = TileAddByDiagDir(t, d);
|
||||||
|
RailType rt = GetTileRailType(next_tile);
|
||||||
|
if (rt == INVALID_RAILTYPE || !HasCatenary(rt) ||
|
||||||
|
((TrackStatusToTrackBits(GetTileTrackStatus(next_tile, TRANSPORT_RAIL, 0)) & DiagdirReachesTracks(d)) == TRACK_BIT_NONE &&
|
||||||
|
(!HasStationTileRail(next_tile) || GetRailStationAxis(next_tile) != DiagDirToAxis(d) || !CanStationTileHaveWires(next_tile)))) {
|
||||||
neighbour_tdb |= DiagdirReachesTrackdirs(ReverseDiagDir(d));
|
neighbour_tdb |= DiagdirReachesTrackdirs(ReverseDiagDir(d));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue