Add setting to control RV re-routing on road layout change

Default to road removal only
This is due to poor performance with many RVs when town growth is
continually adding to the road layout
This commit is contained in:
Jonathan G Rennison
2020-07-02 17:47:26 +01:00
parent 903b0fdd39
commit d5ada6a14b
8 changed files with 66 additions and 26 deletions

View File

@@ -2078,7 +2078,7 @@ CommandCost CmdBuildRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
MarkTileDirtyByTile(cur_tile);
}
ZoningMarkDirtyStationCoverageArea(st);
NotifyRoadLayoutChanged();
NotifyRoadLayoutChanged(true);
}
if (st != nullptr) {
@@ -2196,7 +2196,7 @@ static CommandCost RemoveRoadStop(TileIndex tile, DoCommandFlag flags)
for (const RoadStop *rs = st->bus_stops; rs != nullptr; rs = rs->next) st->bus_station.Add(rs->xy);
}
NotifyRoadLayoutChanged();
NotifyRoadLayoutChanged(false);
}
return CommandCost(EXPENSES_CONSTRUCTION, _price[is_truck ? PR_CLEAR_STATION_TRUCK : PR_CLEAR_STATION_BUS]);