Fix crash which could occur when adjusting train lengths for old saves
e.g. due to only partially initialised timetable
This commit is contained in:
@@ -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)) {
|
if (IsSavegameVersionBefore(SLV_165)) {
|
||||||
for (Town *t : Town::Iterate()) {
|
for (Town *t : Town::Iterate()) {
|
||||||
/* Set the default cargo requirement for town growth */
|
/* 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();
|
InitializeRoadGUI();
|
||||||
|
|
||||||
/* This needs to be done after conversion. */
|
/* This needs to be done after conversion. */
|
||||||
|
Reference in New Issue
Block a user