Fix: Incorrect save/load array size of Town::cargo_accepted
In 11ab3c4e
the number of cargo types was changed from 32 to 64.
The save/load of Town::cargo_accepted was not updated, such that
only half of the data structure is saved/loaded in savegame versions
199 to 218.
Discard and regenerate data from all savegame versions prior to 219.
This commit is contained in:

committed by
Niels Martin Hansen

parent
54237b0e98
commit
7a09413a1a
@@ -2830,7 +2830,7 @@ bool AfterLoadGame()
|
||||
* which is done by StartupEngines(). */
|
||||
if (gcf_res != GLC_ALL_GOOD) StartupEngines();
|
||||
|
||||
if (IsSavegameVersionBefore(SLV_166)) {
|
||||
if (IsSavegameVersionBefore(SLV_FIX_TOWN_ACCEPTANCE)) {
|
||||
/* Update cargo acceptance map of towns. */
|
||||
for (TileIndex t = 0; t < map_size; t++) {
|
||||
if (!IsTileType(t, MP_HOUSE)) continue;
|
||||
|
Reference in New Issue
Block a user