diff options
Diffstat (limited to 'src/saveload')
-rw-r--r-- | src/saveload/afterload.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index fe99e3c3e..c2ac41638 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -2580,6 +2580,11 @@ bool AfterLoadGame() * disable anything at all. So, if some reversing was disabled we * will keep reversing disabled, otherwise it'll be turned on. */ _settings_game.pf.reverse_at_signals = IsSavegameVersionBefore(100) || (_settings_game.pf.wait_oneway_signal != 255 && _settings_game.pf.wait_twoway_signal != 255 && _settings_game.pf.wait_for_pbs_path != 255); + + Train *t; + FOR_ALL_TRAINS(t) { + _settings_game.vehicle.max_train_length = max<uint8>(_settings_game.vehicle.max_train_length, CeilDiv(t->gcache.cached_total_length, TILE_SIZE)); + } } if (IsSavegameVersionBefore(160)) { |