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

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

View File

@@ -117,7 +117,7 @@
if (!IsValidEngine(engine_id)) return -1;
if (GetVehicleType(engine_id) == AIVehicle::VT_RAIL && IsWagon(engine_id)) return -1;
return ::Engine::Get(engine_id)->lifelength * DAYS_IN_LEAP_YEAR;
return ::Engine::Get(engine_id)->GetLifeLengthInDays();
}
/* static */ Money AIEngine::GetRunningCost(EngineID engine_id)