summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-07-24 15:19:26 +0000
committersmatz <smatz@openttd.org>2008-07-24 15:19:26 +0000
commitaae2aa64c4281583ea31d668d85301fe7996bd2e (patch)
tree881cc1be79243d58238de4eda1a24345c93a5735 /src/openttd.cpp
parent9bee9948986c4c4905c53b6214311e2ddb6d6e8d (diff)
downloadopenttd-aae2aa64c4281583ea31d668d85301fe7996bd2e.tar.xz
(svn r13816) -Fix [FS#2150]: check for vehicle length changes outside a depot (callback 0x11) and give a warning about that
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index ae06cd2e8..0fdb22b55 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1013,7 +1013,7 @@ void StateGameLoop()
length = 0;
for (Vehicle *u = v; u != NULL; u = u->Next()) wagons[length++] = u->u.rail;
- TrainConsistChanged(v);
+ TrainConsistChanged(v, true);
length = 0;
for (Vehicle *u = v; u != NULL; u = u->Next()) {
@@ -1266,6 +1266,8 @@ static bool InitializeWindowsAndCaches()
* Reset each town's noise_reached value to '0' before. */
UpdateAirportsNoise();
+ CheckTrainsLengths();
+
return true;
}
@@ -1759,7 +1761,7 @@ bool AfterLoadGame()
}
FOR_ALL_VEHICLES(v) {
- if (v->type == VEH_TRAIN && (IsFrontEngine(v) || IsFreeWagon(v))) TrainConsistChanged(v);
+ if (v->type == VEH_TRAIN && (IsFrontEngine(v) || IsFreeWagon(v))) TrainConsistChanged(v, true);
}
}
@@ -2466,4 +2468,5 @@ void ReloadNewGRFData()
for (PlayerID i = PLAYER_FIRST; i < MAX_PLAYERS; i++) InvalidateWindowData(WC_PLAYER_COLOR, i, _loaded_newgrf_features.has_2CC);
/* redraw the whole screen */
MarkWholeScreenDirty();
+ CheckTrainsLengths();
}