diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index 88dee51b9c..43f9c79253 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -1722,6 +1722,14 @@ bool AfterLoadGame() } } + /* Industry cargo slots were fixed size before (and including) SLV_VEHICLE_ECONOMY_AGE (either 2/3 or 16/16), + * after this they are dynamic. Trim excess slots. */ + if (IsSavegameVersionBeforeOrAt(SLV_VEHICLE_ECONOMY_AGE)) { + for (Industry *i : Industry::Iterate()) { + TrimIndustryAcceptedProduced(i); + } + } + /* Before version 81, the density of grass was always stored as zero, and * grassy trees were always drawn fully grassy. Furthermore, trees on rough * land used to have zero density, now they have full density. Therefore, diff --git a/src/saveload/industry_sl.cpp b/src/saveload/industry_sl.cpp index 342f03d807..ad3f0dc7eb 100644 --- a/src/saveload/industry_sl.cpp +++ b/src/saveload/industry_sl.cpp @@ -266,7 +266,6 @@ struct INDYChunkHandler : ChunkHandler { LoadMoveAcceptsProduced(i, INDUSTRY_NUM_INPUTS, INDUSTRY_NUM_OUTPUTS); } Industry::IncIndustryTypeCount(i->type); - TrimIndustryAcceptedProduced(i); } } diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index 099a2c9c29..e5127b9ad3 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -875,7 +875,6 @@ static bool LoadOldIndustry(LoadgameState *ls, int num) } Industry::IncIndustryTypeCount(i->type); - TrimIndustryAcceptedProduced(i); } else { delete i; }