Fix crash when changing one-way state of road waypoints
This commit is contained in:
@@ -1149,9 +1149,13 @@ CommandCost CmdBuildRoad(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
}
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
if (IsRoadWaypoint(tile)) {
|
||||
SetDriveThroughStopDisallowedRoadDirections(tile, dis_new);
|
||||
} else {
|
||||
RoadStop *rs = RoadStop::GetByTile(tile, GetRoadStopType(tile));
|
||||
rs->ChangeDriveThroughDisallowedRoadDirections(dis_new);
|
||||
MarkTileDirtyByTile(tile);
|
||||
}
|
||||
MarkTileDirtyByTile(tile, VMDF_NOT_MAP_MODE);
|
||||
NotifyRoadLayoutChanged(CountBits(dis_existing) > CountBits(dis_new));
|
||||
UpdateRoadCachedOneWayStatesAroundTile(tile);
|
||||
}
|
||||
|
Reference in New Issue
Block a user