Fix train reverse inside signalled tunnel/bridge entrance clearing reservation of incoming train
This commit is contained in:
@@ -2725,6 +2725,9 @@ void FreeTrainTrackReservation(const Train *v, TileIndex origin, Trackdir orig_t
|
||||
/* Don't free reservation if it's not ours. */
|
||||
if (TracksOverlap(GetReservedTrackbits(tile) | TrackToTrackBits(TrackdirToTrack(td)))) return;
|
||||
|
||||
/* Do not attempt to unreserve out of a signalled tunnel/bridge entrance, as this would unreserve the reservations of another train coming in */
|
||||
if (IsTunnelBridgeWithSignalSimulation(tile) && TrackdirExitsTunnelBridge(tile, td) && IsTunnelBridgeSignalSimulationEntranceOnly(tile)) return;
|
||||
|
||||
CFollowTrackRail ft(v, GetRailTypeInfo(v->railtype)->compatible_railtypes);
|
||||
while (ft.Follow(tile, td)) {
|
||||
tile = ft.m_new_tile;
|
||||
|
Reference in New Issue
Block a user