From d289464d69172a1048048aebe29bfd56250fc6fa Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 25 May 2008 22:36:44 +0000 Subject: (svn r13255) -Codechange: move _opt to _settings. --- src/vehicle.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/vehicle.cpp') 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) { -- cgit v1.2.3-54-g00ecf