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:
Jonathan G Rennison
2016-01-31 22:55:25 +00:00
parent 9742300a1e
commit 5eed9865d6
14 changed files with 89 additions and 43 deletions

View File

@@ -195,6 +195,7 @@ public:
byte breakdown_severity; ///< severity of the breakdown. Note that lower means more severe
byte breakdown_type; ///< Type of breakdown
byte breakdown_chance_factor; ///< Improved breakdowns: current multiplier for breakdown_chance * 128, used for head vehicle only
SpriteID colourmap; ///< NOSAVE: cached colour mapping
/* Related to age and service time */