From e01106f66b8b003ebc847470d1291af8ef640c96 Mon Sep 17 00:00:00 2001 From: frosch Date: Fri, 27 Feb 2009 20:40:39 +0000 Subject: (svn r15592) -Fix: Refit-info in purchase list did only check the first articulated part. --- src/vehicle_gui.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/vehicle_gui.cpp') diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index b3a6c385a..ef2a05835 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -29,6 +29,7 @@ #include "timetable.h" #include "vehiclelist.h" #include "settings_type.h" +#include "articulated_vehicles.h" #include "table/sprites.h" #include "table/strings.h" @@ -447,7 +448,7 @@ uint ShowAdditionalText(int x, int y, uint w, EngineID engine) uint ShowRefitOptionsList(int x, int y, uint w, EngineID engine) { /* List of cargo types of this engine */ - uint32 cmask = EngInfo(engine)->refit_mask; + uint32 cmask = GetUnionOfArticulatedRefitMasks(engine, GetEngine(engine)->type, false); /* List of cargo types available in this climate */ uint32 lmask = _cargo_mask; char string[512]; @@ -1667,9 +1668,6 @@ static bool IsVehicleRefitable(const Vehicle *v) if (!v->IsStoppedInDepot()) return false; do { - /* Skip this vehicle if it has no capacity */ - if (v->cargo_cap == 0) continue; - if (IsEngineRefittable(v->engine_type)) return true; } while ((v->type == VEH_TRAIN || v->type == VEH_ROAD) && (v = v->Next()) != NULL); -- cgit v1.2.3-54-g00ecf