(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.

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
frosch 16 years ago
parent c3c549f731
commit 85333d4211

@ -5746,7 +5746,10 @@ static void CalculateRefitMasks()
* cargo type. Apparently cargo_type isn't a common property... */ * cargo type. Apparently cargo_type isn't a common property... */
switch (e->type) { switch (e->type) {
default: NOT_REACHED(); default: NOT_REACHED();
case VEH_AIRCRAFT: break; case VEH_AIRCRAFT:
if (FindFirstRefittableCargo(engine) == CT_INVALID) ei->climates = 0x80;
break;
case VEH_TRAIN: { case VEH_TRAIN: {
RailVehicleInfo *rvi = &e->u.rail; RailVehicleInfo *rvi = &e->u.rail;
if (rvi->cargo_type == CT_INVALID) rvi->cargo_type = FindFirstRefittableCargo(engine); if (rvi->cargo_type == CT_INVALID) rvi->cargo_type = FindFirstRefittableCargo(engine);

Loading…
Cancel
Save