mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-11 18:10:14 +00:00
(svn r9412) -Fix (r8886): When looking up a cargo type by label skip disabled cargos
This commit is contained in:
parent
4d81a464e2
commit
2f6a46632a
@ -64,6 +64,7 @@ bool CargoSpec::IsValid() const
|
||||
CargoID GetCargoIDByLabel(CargoLabel cl)
|
||||
{
|
||||
for (CargoID c = 0; c < lengthof(_cargo); c++) {
|
||||
if (_cargo[c].bitnum == INVALID_CARGO) continue;
|
||||
if (_cargo[c].label == cl) return c;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user