Improved breakdowns: Remove non-deterministic changes to breakdown_chance.

These cause desyncs in multiplayer.
This commit is contained in:
Jonathan G Rennison
2015-09-27 19:04:12 +01:00
parent 44ecaaff01
commit eed722c777
3 changed files with 15 additions and 6 deletions

View File

@@ -116,16 +116,12 @@ void VehicleServiceInDepot(Vehicle *v)
v->reliability = e->reliability;
v->breakdown_ctr = 0;
v->vehstatus &= ~VS_AIRCRAFT_BROKEN;
/* Prevent vehicles from breaking down directly after exiting the depot. */
v->breakdown_chance /= 4;
SetWindowDirty(WC_VEHICLE_DETAILS, v->index); // ensure that last service date and reliability are updated
do {
v->date_of_last_service = _date;
v->breakdowns_since_last_service = 0;
v->reliability = v->GetEngine()->reliability;
/* Prevent vehicles from breaking down directly after exiting the depot. */
v->breakdown_chance /= 4;
v = v->Next();
} while (v != NULL && v->HasEngineType());
}