Fix 03cc0d6: Mark level crossings dirty when removing road from them, not from bridges (#10138)

pull/451/head
Tyler Trahan 2 years ago committed by GitHub
parent fea6a34684
commit c719ba560e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save