Merge branch 'improved_breakdowns' into jgrpp

This commit is contained in:
Jonathan G Rennison
2017-01-02 19:28:11 +00:00

View File

@@ -160,10 +160,6 @@ void VehicleServiceInDepot(Vehicle *v)
CLRBITS(Train::From(v)->flags, (1 << VRF_BREAKDOWN_BRAKING) | VRF_IS_BROKEN ); CLRBITS(Train::From(v)->flags, (1 << VRF_BREAKDOWN_BRAKING) | VRF_IS_BROKEN );
} }
} }
v->date_of_last_service = _date;
v->breakdowns_since_last_service = 0;
v->reliability = e->reliability;
v->breakdown_ctr = 0;
v->vehstatus &= ~VS_AIRCRAFT_BROKEN; v->vehstatus &= ~VS_AIRCRAFT_BROKEN;
SetWindowDirty(WC_VEHICLE_DETAILS, v->index); // ensure that last service date and reliability are updated SetWindowDirty(WC_VEHICLE_DETAILS, v->index); // ensure that last service date and reliability are updated
@@ -208,6 +204,7 @@ void VehicleServiceInDepot(Vehicle *v)
v->reliability = v->GetEngine()->reliability; v->reliability = v->GetEngine()->reliability;
/* Prevent vehicles from breaking down directly after exiting the depot. */ /* Prevent vehicles from breaking down directly after exiting the depot. */
v->breakdown_chance = 0; v->breakdown_chance = 0;
v->breakdown_ctr = 0;
v = v->Next(); v = v->Next();
} while (v != NULL && v->HasEngineType()); } while (v != NULL && v->HasEngineType());
} }