diff options
author | rubidium <rubidium@openttd.org> | 2010-01-16 22:30:04 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-01-16 22:30:04 +0000 |
commit | 719fb9803cbae4623f5b3be5ed1c3cc6c3e89c98 (patch) | |
tree | 06e5dd67edf41679794ae586b18a8c09de9c1c2a /src/settings.cpp | |
parent | d27999e4463edfb46158687343cd0e4f339a81a1 (diff) | |
download | openttd-719fb9803cbae4623f5b3be5ed1c3cc6c3e89c98.tar.xz |
(svn r18838) -Codechange [FS#3524]: reorganisation of the train acceleration code plus some minor optimisations (Terkhen)
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 b61c22288..703012c81 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -745,6 +745,21 @@ static bool TrainAccelerationModelChanged(int32 p1) return true; } +/** + * This function updates the train acceleration cache after a steepness change. + * @param p1 Callback parameter. + * @return Always true. + */ +static bool TrainSlopeSteepnessChanged(int32 p1) +{ + Train *t; + FOR_ALL_TRAINS(t) { + if (t->IsFrontEngine()) t->CargoChanged(); + } + + return true; +} + static bool DragSignalsDensityChanged(int32) { InvalidateWindowData(WC_BUILD_SIGNAL, 0); |