@@ -427,26 +427,26 @@ static void CalcEngineReliability(Engine
e->reliability = e->reliability_max;
} else if ((age -= e->duration_phase_2) < e->duration_phase_3) {
uint max = e->reliability_max;
e->reliability = (int)age * (int)(e->reliability_final - max) / e->duration_phase_3 + max;
} else {
/* time's up for this engine.
* We will now completely retire this design */
e->company_avail = 0;
e->reliability = e->reliability_final;
/* Kick this engine out of the lists */
AddRemoveEngineFromAutoreplaceAndBuildWindows(e->type);
}
InvalidateWindowClasses(WC_BUILD_VEHICLE); // Update to show the new reliability
InvalidateWindowClasses(WC_REPLACE_VEHICLE);
SetWindowClassesDirty(WC_BUILD_VEHICLE); // Update to show the new reliability
SetWindowClassesDirty(WC_REPLACE_VEHICLE);
void SetYearEngineAgingStops()
{
/* Determine last engine aging year, default to 2050 as previously. */
_year_engine_aging_stops = 2050;
const Engine *e;
FOR_ALL_ENGINES(e) {
const EngineInfo *ei = &e->info;
/* Exclude certain engines */