(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

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