diff options
author | terkhen <terkhen@openttd.org> | 2010-03-06 12:58:33 +0000 |
---|---|---|
committer | terkhen <terkhen@openttd.org> | 2010-03-06 12:58:33 +0000 |
commit | b443a3ee0a39f28be1fde279e67c82ee51814f4d (patch) | |
tree | 031d81ef75f3783bc28166caf7994ea97415434f /src/settings.cpp | |
parent | c958c2c31f0f04cdf66dfae0b95743011202655a (diff) | |
download | openttd-b443a3ee0a39f28be1fde279e67c82ee51814f4d.tar.xz |
(svn r19346) -Feature: Configurable slope steepness for road vehicles from 0% to 10%, default is 7%.
Diffstat (limited to 'src/settings.cpp')
-rw-r--r-- | src/settings.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index b190292e4..e4379f2b2 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -794,6 +794,21 @@ static bool RoadVehAccelerationModelChanged(int32 p1) return true; } +/** + * This function updates the road vehicle acceleration cache after a steepness change. + * @param p1 Callback parameter. + * @return Always true. + */ +static bool RoadVehSlopeSteepnessChanged(int32 p1) +{ + RoadVehicle *rv; + FOR_ALL_ROADVEHICLES(rv) { + if (rv->IsRoadVehFront()) rv->CargoChanged(); + } + + return true; +} + static bool DragSignalsDensityChanged(int32) { InvalidateWindowData(WC_BUILD_SIGNAL, 0); |