Fix crash which could occur when adjusting train lengths for old saves

e.g. due to only partially initialised timetable
pull/611/head
Jonathan G Rennison 7 months ago
parent 9c29950956
commit 35d1955db0

@ -3216,9 +3216,6 @@ bool AfterLoadGame()
}
}
/* The center of train vehicles was changed, fix up spacing. */
if (IsSavegameVersionBefore(SLV_164)) FixupTrainLengths();
if (IsSavegameVersionBefore(SLV_165)) {
for (Town *t : Town::Iterate()) {
/* Set the default cargo requirement for town growth */
@ -4271,6 +4268,12 @@ bool AfterLoadGame()
}
}
/*
* The center of train vehicles was changed, fix up spacing.
* Delay this until all train and track updates have been performed.
*/
if (IsSavegameVersionBefore(SLV_164)) FixupTrainLengths();
InitializeRoadGUI();
/* This needs to be done after conversion. */

Loading…
Cancel
Save