(svn r16581) -Codechange: unify the access to Engine::lifelength.

This commit is contained in:
rubidium
2009-06-16 13:52:18 +00:00
parent 4b05617c42
commit 512b021e26
8 changed files with 17 additions and 6 deletions

View File

@@ -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;