Fix #9680: Recalculating aircraft positions before map array updates caused crashes (#9699)

This commit is contained in:
Charles Pigott 2021-11-15 13:39:41 +00:00 committed by GitHub
parent 0cbe94256e
commit cf16f452da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -957,10 +957,6 @@ bool AfterLoadGame()
}
}
/* In version 2.2 of the savegame, we have new airports, so status of all aircraft is reset.
* This has to be called after the oilrig airport_type update above ^^^ ! */
if (IsSavegameVersionBefore(SLV_2, 2)) UpdateOldAircraft();
/* In version 6.1 we put the town index in the map-array. To do this, we need
* to use m2 (16bit big), so we need to clean m2, and that is where this is
* all about ;) */
@ -2899,6 +2895,10 @@ bool AfterLoadGame()
}
}
/* In version 2.2 of the savegame, we have new airports, so status of all aircraft is reset.
* This has to be called after all map array updates */
if (IsSavegameVersionBefore(SLV_2, 2)) UpdateOldAircraft();
if (IsSavegameVersionBefore(SLV_188)) {
/* Fix articulated road vehicles.
* Some curves were shorter than other curves.