Custom bridge heads: Fix secondary rail track type when removing piece
In case when new configuration is parallel tracks
This commit is contained in:
@@ -934,6 +934,11 @@ CommandCost CmdRemoveSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1,
|
|||||||
if (v != nullptr) FreeTrainTrackReservation(v);
|
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);
|
SetCustomBridgeHeadTrackBits(tile, future);
|
||||||
AddRailTunnelBridgeInfrastructure(tile, other_end);
|
AddRailTunnelBridgeInfrastructure(tile, other_end);
|
||||||
DirtyCompanyInfrastructureWindows(_current_company);
|
DirtyCompanyInfrastructureWindows(_current_company);
|
||||||
|
Reference in New Issue
Block a user