Changeset - r24351:bfcbae8b4f89
[Not reviewed]
master
0 1 0
Galigator - 4 years ago 2020-09-25 07:26:37
Galigator@users.noreply.github.com
Change: Service depot also reset breakdown chance.
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/vehicle.cpp
Show inline comments
 
@@ -167,12 +167,13 @@ void VehicleServiceInDepot(Vehicle *v)
 
	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;
 
		if (_settings_game.difficulty.vehicle_breakdowns == 1) v->breakdown_chance = 0; // on reduced breakdown
 
		v = v->Next();
 
	} while (v != nullptr && v->HasEngineType());
 
}
 

	
 
/**
 
 * Check if the vehicle needs to go to a depot in near future (if a opportunity presents itself) for service or replacement.
0 comments (0 inline, 0 general)