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:
@@ -14,6 +14,7 @@
|
||||
#include "road.h"
|
||||
#include "economy_func.h"
|
||||
#include "transparency.h"
|
||||
#include "settings_type.h"
|
||||
|
||||
/**
|
||||
* Whether the given roadtype is valid.
|
||||
@@ -160,11 +161,21 @@ void UpdateCompanyRoadInfrastructure(RoadType rt, Owner o, int count);
|
||||
struct TileInfo;
|
||||
void DrawRoadOverlays(const TileInfo *ti, PaletteID pal, const RoadTypeInfo *road_rti, const RoadTypeInfo *tram_rit, uint road_offset, uint tram_offset);
|
||||
|
||||
inline bool RoadLayoutChangeNotificationEnabled(bool added)
|
||||
{
|
||||
return _settings_game.pf.reroute_rv_on_layout_change >= (added ? 2 : 1);
|
||||
}
|
||||
|
||||
inline void NotifyRoadLayoutChanged()
|
||||
{
|
||||
_road_layout_change_counter++;
|
||||
}
|
||||
|
||||
inline void NotifyRoadLayoutChanged(bool added)
|
||||
{
|
||||
if (RoadLayoutChangeNotificationEnabled(added)) NotifyRoadLayoutChanged();
|
||||
}
|
||||
|
||||
void NotifyRoadLayoutChangedIfTileNonLeaf(TileIndex tile, RoadTramType rtt, RoadBits present_bits);
|
||||
void NotifyRoadLayoutChangedIfSimpleTunnelBridgeNonLeaf(TileIndex start, TileIndex end, DiagDirection start_dir, RoadTramType rtt);
|
||||
|
||||
|
Reference in New Issue
Block a user