Removing road from combined road/tram tile should clear one way state
This commit is contained in:
@@ -741,6 +741,9 @@ static CommandCost RemoveRoad(TileIndex tile, DoCommandFlag flags, RoadBits piec
|
|||||||
if (flags & DC_EXEC) {
|
if (flags & DC_EXEC) {
|
||||||
/* A full diagonal road tile has two road bits. */
|
/* A full diagonal road tile has two road bits. */
|
||||||
UpdateCompanyRoadInfrastructure(existing_rt, GetRoadOwner(tile, rtt), -2);
|
UpdateCompanyRoadInfrastructure(existing_rt, GetRoadOwner(tile, rtt), -2);
|
||||||
|
if (rtt == RTT_ROAD) {
|
||||||
|
SetDriveThroughStopDisallowedRoadDirections(tile, DRD_NONE);
|
||||||
|
}
|
||||||
SetRoadType(tile, rtt, INVALID_ROADTYPE);
|
SetRoadType(tile, rtt, INVALID_ROADTYPE);
|
||||||
MarkTileDirtyByTile(tile);
|
MarkTileDirtyByTile(tile);
|
||||||
NotifyRoadLayoutChanged(false);
|
NotifyRoadLayoutChanged(false);
|
||||||
@@ -814,6 +817,7 @@ static CommandCost RemoveRoad(TileIndex tile, DoCommandFlag flags, RoadBits piec
|
|||||||
const Town *town = CalcClosestTownFromTile(tile);
|
const Town *town = CalcClosestTownFromTile(tile);
|
||||||
SetTownIndex(tile, town == nullptr ? INVALID_TOWN : town->index);
|
SetTownIndex(tile, town == nullptr ? INVALID_TOWN : town->index);
|
||||||
}
|
}
|
||||||
|
if (rtt == RTT_ROAD) SetDisallowedRoadDirections(tile, DRD_NONE);
|
||||||
SetRoadBits(tile, ROAD_NONE, rtt);
|
SetRoadBits(tile, ROAD_NONE, rtt);
|
||||||
SetRoadType(tile, rtt, INVALID_ROADTYPE);
|
SetRoadType(tile, rtt, INVALID_ROADTYPE);
|
||||||
MarkTileDirtyByTile(tile);
|
MarkTileDirtyByTile(tile);
|
||||||
|
Reference in New Issue
Block a user