summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-25 19:17:03 +0000
committerrubidium <rubidium@openttd.org>2008-05-25 19:17:03 +0000
commit4625695653c3c0be16b61b640c206c557af9ec7b (patch)
treed480693e848eb121add7037faa150875d750cc98 /src/engine.cpp
parent6ea832ec7cbd572c72e96a179bb8c744834ee2e7 (diff)
downloadopenttd-4625695653c3c0be16b61b640c206c557af9ec7b.tar.xz
(svn r13251) -Codechange: rename _patches to _settings as that is more logic.
-Codechange: move all Settings into substructs of _settings in a way that they are logically grouped.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 3f361c048..37bedbf06 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -217,7 +217,7 @@ static void CalcEngineReliability(Engine *e)
uint age = e->age;
/* Check for early retirement */
- if (e->player_avail != 0 && !_patches.never_expire_vehicles) {
+ if (e->player_avail != 0 && !_settings.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) {
@@ -230,7 +230,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 || _patches.never_expire_vehicles) {
+ } else if ((age -= e->duration_phase_1) < e->duration_phase_2 || _settings.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;
@@ -293,7 +293,7 @@ void StartupEngines()
CalcEngineReliability(e);
}
- e->lifelength = ei->lifelength + _patches.extend_vehicle_life;
+ e->lifelength = ei->lifelength + _settings.vehicle.extend_vehicle_life;
/* prevent certain engines from ever appearing. */
if (!HasBit(ei->climates, _opt.landscape)) {