# HG changeset patch # User Tyler Trahan # Date 2022-11-05 18:46:19 # Node ID 91727c8efb921ab88b5bdcae7e160b427bc3a0d8 # Parent 468698ef10189cda441d4777a42d85d2691b83f0 Fix 03cc0d6: Mark level crossings dirty when removing road from them, not from bridges (#10138) diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -380,8 +380,6 @@ static CommandCost RemoveRoad(TileIndex 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 } if (flags & DC_EXEC) { + MarkDirtyAdjacentLevelCrossingTiles(tile, GetCrossingRoadAxis(tile)); + /* A full diagonal road tile has two road bits. */ UpdateCompanyRoadInfrastructure(existing_rt, GetRoadOwner(tile, rtt), -2);