From aae2aa64c4281583ea31d668d85301fe7996bd2e Mon Sep 17 00:00:00 2001 From: smatz Date: Thu, 24 Jul 2008 15:19:26 +0000 Subject: (svn r13816) -Fix [FS#2150]: check for vehicle length changes outside a depot (callback 0x11) and give a warning about that --- src/openttd.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/openttd.cpp') 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(); } -- cgit v1.2.3-54-g00ecf