diff options
author | rubidium <rubidium@openttd.org> | 2008-05-25 22:36:44 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-05-25 22:36:44 +0000 |
commit | 8c9cc415e3eac6a7709f6a8978f213311416312e (patch) | |
tree | 1460114c8e9243ecb6e428c7db15dfa7abc391ed /src/vehicle.cpp | |
parent | 51ca426c4bdb85137be82b0cc2436fc5ac0c442f (diff) | |
download | openttd-8c9cc415e3eac6a7709f6a8978f213311416312e.tar.xz |
(svn r13255) -Codechange: move _opt to _settings.
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index bdfef2aa4..f5bb940f7 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -127,7 +127,7 @@ bool Vehicle::NeedsServicing() const { if (this->vehstatus & (VS_STOPPED | VS_CRASHED)) return false; - if (_settings.order.no_servicing_if_no_breakdowns && _opt.diff.vehicle_breakdowns == 0) { + if (_settings.order.no_servicing_if_no_breakdowns && _settings.difficulty.vehicle_breakdowns == 0) { /* Vehicles set for autoreplacing needs to go to a depot even if breakdowns are turned off. * Note: If servicing is enabled, we postpone replacement till next service. */ return EngineHasReplacementForPlayer(GetPlayer(this->owner), this->engine_type, this->group_id); @@ -913,7 +913,7 @@ void CheckVehicleBreakdown(Vehicle *v) if ((rel_old >> 8) != (rel >> 8)) InvalidateWindow(WC_VEHICLE_DETAILS, v->index); if (v->breakdown_ctr != 0 || v->vehstatus & VS_STOPPED || - _opt.diff.vehicle_breakdowns < 1 || + _settings.difficulty.vehicle_breakdowns < 1 || v->cur_speed < 5 || _game_mode == GM_MENU) { return; } @@ -930,7 +930,7 @@ void CheckVehicleBreakdown(Vehicle *v) if (v->type == VEH_SHIP) rel += 0x6666; /* reduced breakdowns? */ - if (_opt.diff.vehicle_breakdowns == 1) rel += 0x6666; + if (_settings.difficulty.vehicle_breakdowns == 1) rel += 0x6666; /* check if to break down */ if (_breakdown_chance[(uint)min(rel, 0xffff) >> 10] <= v->breakdown_chance) { |