summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2011-02-13 20:45:17 +0000
committeryexo <yexo@openttd.org>2011-02-13 20:45:17 +0000
commitf1377a228fbe6ed5e6393c5428970742c520340e (patch)
tree234b4e68c4ac851d9bb4281f7fbd12fb9353b564 /src/settings.cpp
parent6a58f3487860dafde6f9b3653e75b78f74108f02 (diff)
downloadopenttd-f1377a228fbe6ed5e6393c5428970742c520340e.tar.xz
(svn r22073) -Fix: immediately update the train weight when you change the multiplier for train cargo weight
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index ded3b441e..e4bc9f336 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -1146,6 +1146,17 @@ static bool StationCatchmentChanged(int32 p1)
return true;
}
+
+static bool MarkAllTrainsDirty(int32 p1)
+{
+ Train *t;
+ FOR_ALL_TRAINS(t) {
+ if (t->IsPrimaryVehicle()) t->MarkDirty();
+ }
+ SetWindowClassesDirty(WC_VEHICLE_DETAILS);
+ return true;
+}
+
#ifdef ENABLE_NETWORK
static bool UpdateClientName(int32 p1)