Improved breakdowns: Various changes and fixes.
* Revert breakdown_chance to (mostly) its original behaviour. * Create a new breakdown_chance_factor to hold breakdown_chance from improved breakdowns logic. * Revert airport crash probabilities back to original behaviour, with modified behaviour only during emergency landings. * Low power breakdowns now only reduce the power of the engine which has broken down. * Low power breakdowns no longer reduce speed directly. * Add callback function to run whenever improved breakdowns setting is changed. Reset breakdown_chance_factor where required. * More whitespace/formatting...
This commit is contained in:
@@ -2835,14 +2835,15 @@ bool AfterLoadGame()
|
||||
v->reliability = min(v->First()->reliability, e->reliability);
|
||||
}
|
||||
}
|
||||
/* FALL THROUGH */
|
||||
case VEH_ROAD:
|
||||
v->breakdown_chance = 128;
|
||||
v->breakdown_chance_factor = 128;
|
||||
break;
|
||||
case VEH_SHIP:
|
||||
v->breakdown_chance = 64;
|
||||
v->breakdown_chance_factor = 64;
|
||||
break;
|
||||
case VEH_AIRCRAFT:
|
||||
v->breakdown_chance = Clamp(64 + (AircraftVehInfo(v->engine_type)->max_speed >> 3), 0, 255);
|
||||
v->breakdown_chance_factor = Clamp(64 + (AircraftVehInfo(v->engine_type)->max_speed >> 3), 0, 255);
|
||||
v->breakdown_severity = 40;
|
||||
break;
|
||||
default: break;
|
||||
|
Reference in New Issue
Block a user