mirror of https://github.com/OpenTTD/OpenTTD.git
(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:
parent
37483180e8
commit
296af35741
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue