mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
Fix signalled bridge/tunnel not always being redrawn on (un)reservation.
This commit is contained in:
parent
3ae94d857c
commit
17f74e4c51
@ -126,6 +126,7 @@ bool TryReserveRailTrack(TileIndex tile, Track t, bool trigger_stations)
|
|||||||
if (GetTunnelBridgeTransportType(tile) == TRANSPORT_RAIL && !GetTunnelBridgeReservationTrackBits(tile)) {
|
if (GetTunnelBridgeTransportType(tile) == TRANSPORT_RAIL && !GetTunnelBridgeReservationTrackBits(tile)) {
|
||||||
SetTunnelBridgeReservation(tile, true);
|
SetTunnelBridgeReservation(tile, true);
|
||||||
if (IsTunnelBridgeExit(tile) && IsTunnelBridgePBS(tile)) SetTunnelBridgeExitGreen(tile, true);
|
if (IsTunnelBridgeExit(tile) && IsTunnelBridgePBS(tile)) SetTunnelBridgeExitGreen(tile, true);
|
||||||
|
MarkTileDirtyByTile(tile);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -181,6 +182,7 @@ void UnreserveRailTrack(TileIndex tile, Track t)
|
|||||||
if (GetTunnelBridgeTransportType(tile) == TRANSPORT_RAIL) {
|
if (GetTunnelBridgeTransportType(tile) == TRANSPORT_RAIL) {
|
||||||
SetTunnelBridgeReservation(tile, false);
|
SetTunnelBridgeReservation(tile, false);
|
||||||
if (IsTunnelBridgeExit(tile) && IsTunnelBridgePBS(tile)) SetTunnelBridgeExitGreen(tile, false);
|
if (IsTunnelBridgeExit(tile) && IsTunnelBridgePBS(tile)) SetTunnelBridgeExitGreen(tile, false);
|
||||||
|
MarkTileDirtyByTile(tile);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -3231,6 +3231,7 @@ static bool CheckTrainStayInWormHolePathReserve(Train *t, TileIndex tile)
|
|||||||
if (reserved == TRACKDIR_BIT_NONE) {
|
if (reserved == TRACKDIR_BIT_NONE) {
|
||||||
/* next tile is not reserved, so reserve the exit tile */
|
/* next tile is not reserved, so reserve the exit tile */
|
||||||
SetTunnelBridgeReservation(tile, true);
|
SetTunnelBridgeReservation(tile, true);
|
||||||
|
MarkTileDirtyByTile(tile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool ok = TryPathReserve(t);
|
bool ok = TryPathReserve(t);
|
||||||
|
Loading…
Reference in New Issue
Block a user