Fix town production and acceptance cache saveload/update handling
This commit is contained in:
@@ -3093,17 +3093,21 @@ bool AfterLoadGame()
|
||||
* which is done by StartupEngines(). */
|
||||
if (gcf_res != GLC_ALL_GOOD) StartupEngines();
|
||||
|
||||
if (IsSavegameVersionBefore(SLV_166)) {
|
||||
if (SlXvIsFeatureMissing(XSLFI_TOWN_CARGO_MATRIX)) {
|
||||
/* Update cargo acceptance map of towns. */
|
||||
Town *town;
|
||||
FOR_ALL_TOWNS(town) {
|
||||
town->cargo_accepted.Clear();
|
||||
}
|
||||
for (TileIndex t = 0; t < map_size; t++) {
|
||||
if (!IsTileType(t, MP_HOUSE)) continue;
|
||||
Town::Get(GetTownIndex(t))->cargo_accepted.Add(t);
|
||||
}
|
||||
|
||||
Town *town;
|
||||
FOR_ALL_TOWNS(town) {
|
||||
UpdateTownCargoes(town);
|
||||
}
|
||||
UpdateTownCargoBitmap();
|
||||
}
|
||||
|
||||
/* Set some breakdown-related variables to the correct values. */
|
||||
|
Reference in New Issue
Block a user