summaryrefslogtreecommitdiff
path: root/src/build_vehicle_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-06-16 13:52:18 +0000
committerrubidium <rubidium@openttd.org>2009-06-16 13:52:18 +0000
commit512b021e261f042dccd9bdc254cd470a46e575f5 (patch)
treee78a9754bf6d326bf90b988cbe69ed74a6a763b4 /src/build_vehicle_gui.cpp
parent4b05617c42c89a323560a0bfd9225fcac9b69588 (diff)
downloadopenttd-512b021e261f042dccd9bdc254cd470a46e575f5.tar.xz
(svn r16581) -Codechange: unify the access to Engine::lifelength.
Diffstat (limited to 'src/build_vehicle_gui.cpp')
-rw-r--r--src/build_vehicle_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp
index 72cfb0a29..eea5d5585 100644
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -676,7 +676,7 @@ int DrawVehiclePurchaseInfo(int left, int right, int y, EngineID engine_number)
if (e->type != VEH_TRAIN || RailVehInfo(engine_number)->railveh_type != RAILVEH_WAGON) {
/* Design date - Life length */
SetDParam(0, ymd.year);
- SetDParam(1, e->lifelength);
+ SetDParam(1, e->GetLifeLengthInDays() / DAYS_IN_LEAP_YEAR);
DrawString(left, right, y, STR_PURCHASE_INFO_DESIGNED_LIFE);
y += FONT_HEIGHT_NORMAL;