diff options
author | frosch <frosch@openttd.org> | 2009-02-27 20:40:39 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-02-27 20:40:39 +0000 |
commit | e01106f66b8b003ebc847470d1291af8ef640c96 (patch) | |
tree | 7419f11ae37834876be39c85f17576ba1dd82c3e /src/vehicle_gui.cpp | |
parent | 729972847269e3661e2647f18061f1a02d010d0c (diff) | |
download | openttd-e01106f66b8b003ebc847470d1291af8ef640c96.tar.xz |
(svn r15592) -Fix: Refit-info in purchase list did only check the first articulated part.
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r-- | src/vehicle_gui.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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); |