diff options
author | rubidium <rubidium@openttd.org> | 2009-06-16 13:52:18 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-06-16 13:52:18 +0000 |
commit | 512b021e261f042dccd9bdc254cd470a46e575f5 (patch) | |
tree | e78a9754bf6d326bf90b988cbe69ed74a6a763b4 /src/ai/api | |
parent | 4b05617c42c89a323560a0bfd9225fcac9b69588 (diff) | |
download | openttd-512b021e261f042dccd9bdc254cd470a46e575f5.tar.xz |
(svn r16581) -Codechange: unify the access to Engine::lifelength.
Diffstat (limited to 'src/ai/api')
-rw-r--r-- | src/ai/api/ai_engine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/api/ai_engine.cpp b/src/ai/api/ai_engine.cpp index 64c85de04..b8be61069 100644 --- a/src/ai/api/ai_engine.cpp +++ b/src/ai/api/ai_engine.cpp @@ -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) |