summaryrefslogtreecommitdiff
path: root/src/aircraft_gui.cpp
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2008-08-18 16:52:40 +0000
committercelestar <celestar@openttd.org>2008-08-18 16:52:40 +0000
commit23a48b2815c6cea2857cd44748f4e9eec42658c5 (patch)
tree5b0ecf13a8ec0041ff1289769acbddf67dda4426 /src/aircraft_gui.cpp
parent99efe9aaae2f7d6d39ab694e0be9981b738661ec (diff)
downloadopenttd-23a48b2815c6cea2857cd44748f4e9eec42658c5.tar.xz
(svn r14098) -Fix: Make the 'Transfer Credit' display aware of the entire consist, not only the first vehicle
Diffstat (limited to 'src/aircraft_gui.cpp')
-rw-r--r--src/aircraft_gui.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/aircraft_gui.cpp b/src/aircraft_gui.cpp
index e17e29a25..d4a484a31 100644
--- a/src/aircraft_gui.cpp
+++ b/src/aircraft_gui.cpp
@@ -28,6 +28,7 @@
void DrawAircraftDetails(const Vehicle *v, int x, int y)
{
int y_offset = (v->Next()->cargo_cap != 0) ? -11 : 0;
+ Money feeder_share = 0;
for (const Vehicle *u = v ; u != NULL ; u = u->Next()) {
if (IsNormalAircraft(u)) {
@@ -53,11 +54,12 @@ void DrawAircraftDetails(const Vehicle *v, int x, int y)
SetDParam(1, cargo_count);
SetDParam(2, u->cargo.Source());
DrawString(x, y + 21 + y_offset, STR_8813_FROM, TC_FROMSTRING);
+ feeder_share += u->cargo.FeederShare();
}
}
}
- SetDParam(0, v->cargo.FeederShare());
+ SetDParam(0, feeder_share);
DrawString(x, y + 33 + y_offset, STR_FEEDER_CARGO_VALUE, TC_FROMSTRING);
}