mirror of https://github.com/OpenTTD/OpenTTD
(svn r23584) -Fix: Draw PBS reservations also for tunnels with railtype overlays.
parent
8c6a37d4b4
commit
89c263c2df
|
@ -1100,12 +1100,6 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
|
||||||
image += tunnelbridge_direction * 2;
|
image += tunnelbridge_direction * 2;
|
||||||
DrawGroundSprite(image, PAL_NONE);
|
DrawGroundSprite(image, PAL_NONE);
|
||||||
|
|
||||||
/* PBS debugging, draw reserved tracks darker */
|
|
||||||
if (_game_mode != GM_MENU && _settings_client.gui.show_track_reservation && (transport_type == TRANSPORT_RAIL && HasTunnelBridgeReservation(ti->tile))) {
|
|
||||||
const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(ti->tile));
|
|
||||||
DrawGroundSprite(DiagDirToAxis(tunnelbridge_direction) == AXIS_X ? rti->base_sprites.single_x : rti->base_sprites.single_y, PALETTE_CRASH);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (transport_type == TRANSPORT_ROAD) {
|
if (transport_type == TRANSPORT_ROAD) {
|
||||||
RoadTypes rts = GetRoadTypes(ti->tile);
|
RoadTypes rts = GetRoadTypes(ti->tile);
|
||||||
|
|
||||||
|
@ -1128,6 +1122,11 @@ static void DrawTile_TunnelBridge(TileInfo *ti)
|
||||||
if (surface != 0) DrawGroundSprite(surface + tunnelbridge_direction, PAL_NONE);
|
if (surface != 0) DrawGroundSprite(surface + tunnelbridge_direction, PAL_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* PBS debugging, draw reserved tracks darker */
|
||||||
|
if (_game_mode != GM_MENU && _settings_client.gui.show_track_reservation && HasTunnelBridgeReservation(ti->tile)) {
|
||||||
|
DrawGroundSprite(DiagDirToAxis(tunnelbridge_direction) == AXIS_X ? rti->base_sprites.single_x : rti->base_sprites.single_y, PALETTE_CRASH);
|
||||||
|
}
|
||||||
|
|
||||||
if (HasCatenaryDrawn(GetRailType(ti->tile))) {
|
if (HasCatenaryDrawn(GetRailType(ti->tile))) {
|
||||||
/* Maybe draw pylons on the entry side */
|
/* Maybe draw pylons on the entry side */
|
||||||
DrawCatenary(ti);
|
DrawCatenary(ti);
|
||||||
|
|
Loading…
Reference in New Issue