mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-13 17:49:10 +00:00
(svn r16586) -Codechange: don't store lifelength in the savegame; it can easily be calculated, it isn't used often and now changing extend_vehicle_life in game has some effect.
This commit is contained in:
@@ -322,7 +322,7 @@ uint Engine::GetDisplayMaxTractiveEffort() const
|
||||
Date Engine::GetLifeLengthInDays() const
|
||||
{
|
||||
/* Assume leap years; this gives the player a bit more than the given amount of years, but never less. */
|
||||
return this->lifelength * DAYS_IN_LEAP_YEAR;
|
||||
return (this->info.lifelength + _settings_game.vehicle.extend_vehicle_life) * DAYS_IN_LEAP_YEAR;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -516,8 +516,6 @@ void StartupOneEngine(Engine *e, Date aging_date)
|
||||
|
||||
CalcEngineReliability(e);
|
||||
|
||||
e->lifelength = ei->lifelength + _settings_game.vehicle.extend_vehicle_life;
|
||||
|
||||
/* prevent certain engines from ever appearing. */
|
||||
if (!HasBit(ei->climates, _settings_game.game_creation.landscape)) {
|
||||
e->flags |= ENGINE_AVAILABLE;
|
||||
|
Reference in New Issue
Block a user