1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 17:19:09 +00:00

Fix 952d111: Houses and industry tiles could accept incorrect cargo. (#12547)

Default cargo label was not cleared (set to CT_INVALID) when using older 3-slot acceptance properties for house and industry tiles.

Missed in #12053 and #12062.
This commit is contained in:
2024-04-21 19:46:05 +01:00
committed by Peter Nelson
parent aece877960
commit 17ae92c50d

View File

@@ -2563,6 +2563,7 @@ static ChangeInfoResult TownHouseChangeInfo(uint hid, int numinfo, int prop, Byt
} else {
housespec->accepts_cargo[j] = cargo;
}
housespec->accepts_cargo_label[j] = CT_INVALID;
}
break;
}
@@ -3299,6 +3300,7 @@ static ChangeInfoResult IndustrytilesChangeInfo(uint indtid, int numinfo, int pr
uint16_t acctp = buf->ReadWord();
tsp->accepts_cargo[prop - 0x0A] = GetCargoTranslation(GB(acctp, 0, 8), _cur.grffile);
tsp->acceptance[prop - 0x0A] = Clamp(GB(acctp, 8, 8), 0, 16);
tsp->accepts_cargo_label[prop - 0x0A] = CT_INVALID;
break;
}