@@ -263,25 +263,25 @@ static void Load_TOWN()
while ((index = SlIterateArray()) != -1) {
Town *t = new (index) Town();
SlObject(t, _town_desc);
for (CargoID i = 0; i < NUM_CARGO; i++) {
SlObject(&t->supplied[i], _town_supplied_desc);
}
for (int i = TE_BEGIN; i < TE_END; i++) {
SlObject(&t->received[i], _town_received_desc);
if (t->townnamegrfid == 0 && !IsInsideMM(t->townnametype, SPECSTR_TOWNNAME_START, SPECSTR_TOWNNAME_LAST)) {
if (t->townnamegrfid == 0 && !IsInsideMM(t->townnametype, SPECSTR_TOWNNAME_START, SPECSTR_TOWNNAME_LAST + 1)) {
SlErrorCorrupt("Invalid town name generator");
if (IsSavegameVersionBefore(166)) continue;
SlObject(&t->cargo_accepted, GetTileMatrixDesc());
if (t->cargo_accepted.area.w != 0) {
uint arr_len = t->cargo_accepted.area.w / AcceptanceMatrix::GRID * t->cargo_accepted.area.h / AcceptanceMatrix::GRID;
t->cargo_accepted.data = MallocT<uint32>(arr_len);
SlArray(t->cargo_accepted.data, arr_len, SLE_UINT32);
/* Rebuild total cargo acceptance. */
Status change: