mirror of https://github.com/OpenTTD/OpenTTD
Fix 03cc0d6: Mark level crossings dirty when removing road from them, not from bridges (#10138)
parent
fea6a34684
commit
c719ba560e
|
@ -380,8 +380,6 @@ static CommandCost RemoveRoad(TileIndex tile, DoCommandFlag flags, RoadBits piec
|
|||
uint len = GetTunnelBridgeLength(other_end, tile) + 2;
|
||||
cost.AddCost(len * 2 * RoadClearCost(existing_rt));
|
||||
if (flags & DC_EXEC) {
|
||||
MarkDirtyAdjacentLevelCrossingTiles(tile, GetCrossingRoadAxis(tile));
|
||||
|
||||
/* A full diagonal road tile has two road bits. */
|
||||
UpdateCompanyRoadInfrastructure(existing_rt, GetRoadOwner(tile, rtt), -(int)(len * 2 * TUNNELBRIDGE_TRACKBIT_FACTOR));
|
||||
|
||||
|
@ -504,6 +502,8 @@ static CommandCost RemoveRoad(TileIndex tile, DoCommandFlag flags, RoadBits piec
|
|||
}
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
MarkDirtyAdjacentLevelCrossingTiles(tile, GetCrossingRoadAxis(tile));
|
||||
|
||||
/* A full diagonal road tile has two road bits. */
|
||||
UpdateCompanyRoadInfrastructure(existing_rt, GetRoadOwner(tile, rtt), -2);
|
||||
|
||||
|
|
Loading…
Reference in New Issue