(svn r9412) -Fix (r8886): When looking up a cargo type by label skip disabled cargos
This commit is contained in:
@@ -64,6 +64,7 @@ bool CargoSpec::IsValid() const
|
|||||||
CargoID GetCargoIDByLabel(CargoLabel cl)
|
CargoID GetCargoIDByLabel(CargoLabel cl)
|
||||||
{
|
{
|
||||||
for (CargoID c = 0; c < lengthof(_cargo); c++) {
|
for (CargoID c = 0; c < lengthof(_cargo); c++) {
|
||||||
|
if (_cargo[c].bitnum == INVALID_CARGO) continue;
|
||||||
if (_cargo[c].label == cl) return c;
|
if (_cargo[c].label == cl) return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user