summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-02-21 11:50:17 +0000
committerfrosch <frosch@openttd.org>2009-02-21 11:50:17 +0000
commit85333d4211d449f0ccc5ef6cbb928e7f7773d70e (patch)
tree736a5b804d7f03829a23a846970079cc8bd73a53 /src
parentc3c549f73105b88cf728744587821721a9e45c0f (diff)
downloadopenttd-85333d4211d449f0ccc5ef6cbb928e7f7773d70e.tar.xz
(svn r15539) -Fix: If an aircraft cannot carry any available cargo, it should not be available either instead of falling back to passenger/mail. Just like the other vehicle types also do.
Diffstat (limited to 'src')
-rw-r--r--src/newgrf.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 8d4065995..dc507ecda 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -5746,7 +5746,10 @@ static void CalculateRefitMasks()
* cargo type. Apparently cargo_type isn't a common property... */
switch (e->type) {
default: NOT_REACHED();
- case VEH_AIRCRAFT: break;
+ case VEH_AIRCRAFT:
+ if (FindFirstRefittableCargo(engine) == CT_INVALID) ei->climates = 0x80;
+ break;
+
case VEH_TRAIN: {
RailVehicleInfo *rvi = &e->u.rail;
if (rvi->cargo_type == CT_INVALID) rvi->cargo_type = FindFirstRefittableCargo(engine);