summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2014-08-09 19:32:51 +0000
committeralberth <alberth@openttd.org>2014-08-09 19:32:51 +0000
commitbe4bbf7dd989e5fc00e9a1129cff73f866c82eb1 (patch)
tree38e64d6ec636f8d4c134c77ea6a528e3fe4d7cfb /src
parent258e51014187e178a565d603443bee590274c71d (diff)
downloadopenttd-be4bbf7dd989e5fc00e9a1129cff73f866c82eb1.tar.xz
(svn r26723) -Fix[FS#5997]: Properly check for cargo acceptance of houses.
Diffstat (limited to 'src')
-rw-r--r--src/industry_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 6f944b187..605c7bc60 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -2002,7 +2002,7 @@ struct CargoesRow {
if (!hs->enabled) continue;
for (uint j = 0; j < lengthof(hs->accepts_cargo); j++) {
- if (cargo_fld->u.cargo.vertical_cargoes[i] == hs->accepts_cargo[j]) {
+ if (hs->cargo_acceptance[j] > 0 && cargo_fld->u.cargo.vertical_cargoes[i] == hs->accepts_cargo[j]) {
cargo_fld->ConnectCargo(cargo_fld->u.cargo.vertical_cargoes[i], false);
goto next_cargo;
}
@@ -2194,7 +2194,7 @@ struct IndustryCargoesWindow : public Window {
if (!hs->enabled || !(hs->building_availability & climate_mask)) continue;
for (uint j = 0; j < lengthof(hs->accepts_cargo); j++) {
- if (cargoes[i] == hs->accepts_cargo[j]) return true;
+ if (hs->cargo_acceptance[j] > 0 && cargoes[i] == hs->accepts_cargo[j]) return true;
}
}
}