(svn r22061) -Change: when loading old savegames with long trains set the maximum train length to the length of the longest train

This commit is contained in:
yexo 2011-02-11 20:54:49 +00:00
parent 37483180e8
commit 296af35741
1 changed files with 5 additions and 0 deletions

View File

@ -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)) {