Changeset - r26508:91727c8efb92
[Not reviewed]
master
0 1 0
Tyler Trahan - 22 months ago 2022-11-05 18:46:19
tyler@tylertrahan.com
Fix 03cc0d6: Mark level crossings dirty when removing road from them, not from bridges (#10138)
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/road_cmd.cpp
Show inline comments
 
@@ -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);
 

	
0 comments (0 inline, 0 general)