Skip to content

Commit

Permalink
Fix OpenTTD#9680: Recalculating aircraft positions before map array u…
Browse files Browse the repository at this point in the history
…pdates caused crashes
  • Loading branch information
LordAro committed Nov 15, 2021
1 parent 0cbe942 commit 2f2c9c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/saveload/afterload.cpp
Expand Up @@ -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 ;) */
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 2f2c9c8

Please sign in to comment.