From 923e21129c94c36bb403e955a1f334ef34722e8b Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 29 May 2008 15:13:28 +0000 Subject: (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games. --- src/engine.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/engine.cpp') diff --git a/src/engine.cpp b/src/engine.cpp index c3d1f5185..9c650984d 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -189,7 +189,7 @@ static void CalcEngineReliability(Engine *e) uint age = e->age; /* Check for early retirement */ - if (e->player_avail != 0 && !_settings.vehicle.never_expire_vehicles) { + if (e->player_avail != 0 && !_settings_game.vehicle.never_expire_vehicles) { int retire_early = e->info.retire_early; uint retire_early_max_age = max(0, e->duration_phase_1 + e->duration_phase_2 - retire_early * 12); if (retire_early != 0 && age >= retire_early_max_age) { @@ -202,7 +202,7 @@ static void CalcEngineReliability(Engine *e) if (age < e->duration_phase_1) { uint start = e->reliability_start; e->reliability = age * (e->reliability_max - start) / e->duration_phase_1 + start; - } else if ((age -= e->duration_phase_1) < e->duration_phase_2 || _settings.vehicle.never_expire_vehicles) { + } else if ((age -= e->duration_phase_1) < e->duration_phase_2 || _settings_game.vehicle.never_expire_vehicles) { /* We are at the peak of this engines life. It will have max reliability. * This is also true if the engines never expire. They will not go bad over time */ e->reliability = e->reliability_max; @@ -265,10 +265,10 @@ void StartupEngines() CalcEngineReliability(e); } - e->lifelength = ei->lifelength + _settings.vehicle.extend_vehicle_life; + e->lifelength = ei->lifelength + _settings_game.vehicle.extend_vehicle_life; /* prevent certain engines from ever appearing. */ - if (!HasBit(ei->climates, _settings.game_creation.landscape)) { + if (!HasBit(ei->climates, _settings_game.game_creation.landscape)) { e->flags |= ENGINE_AVAILABLE; e->player_avail = 0; } -- cgit v1.2.3-54-g00ecf