Changeset - r28425:4267927a67ad
[Not reviewed]
master
0 1 0
Jonathan G Rennison - 11 months ago 2024-01-09 08:59:44
j.g.rennison@gmail.com
Fix: Clear one way state when removing road from road+tram tile
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/road_cmd.cpp
Show inline comments
 
@@ -464,12 +464,13 @@ static CommandCost RemoveRoad(TileIndex 
 
					} else {
 
						if (rtt == RTT_ROAD && IsRoadOwner(tile, rtt, OWNER_TOWN)) {
 
							/* Update nearest-town index */
 
							const Town *town = CalcClosestTownFromTile(tile);
 
							SetTownIndex(tile, town == nullptr ? INVALID_TOWN : town->index);
 
						}
 
						if (rtt == RTT_ROAD) SetDisallowedRoadDirections(tile, DRD_NONE);
 
						SetRoadBits(tile, ROAD_NONE, rtt);
 
						SetRoadType(tile, rtt, INVALID_ROADTYPE);
 
						MarkTileDirtyByTile(tile);
 
					}
 
				} else {
 
					/* When bits are removed, you *always* end up with something that
0 comments (0 inline, 0 general)