Custom bridge heads: Fix secondary rail track type when removing piece

In case when new configuration is parallel tracks
This commit is contained in:
Jonathan G Rennison
2020-04-29 17:56:26 +01:00
parent b458c0c88d
commit cba9b56ff7

View File

@@ -934,6 +934,11 @@ CommandCost CmdRemoveSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1,
if (v != nullptr) FreeTrainTrackReservation(v);
}
if (future == TRACK_BIT_HORZ || future == TRACK_BIT_VERT) {
// Changing to two separate tracks with separate rail types
SetSecondaryRailType(tile, GetRailType(tile));
}
SetCustomBridgeHeadTrackBits(tile, future);
AddRailTunnelBridgeInfrastructure(tile, other_end);
DirtyCompanyInfrastructureWindows(_current_company);