Improved breakdowns: Remove non-deterministic changes to breakdown_chance.
These cause desyncs in multiplayer.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user