diff options
author | Eddi-z <43699911+Eddi-z@users.noreply.github.com> | 2019-02-10 18:45:48 +0100 |
---|---|---|
committer | Niels Martin Hansen <nielsm@indvikleren.dk> | 2019-02-10 18:45:48 +0100 |
commit | 148e5b41d668a82e866f70d559dead0d5ffbeb99 (patch) | |
tree | 8dde7280c95dc897d8b248748b448d4baf1c02b2 | |
parent | 2ff10327d7962ee61f5eb45baa804e80fa966405 (diff) | |
download | openttd-148e5b41d668a82e866f70d559dead0d5ffbeb99.tar.xz |
Change: Skip reliability decay if servicing is disabled
-rw-r--r-- | src/vehicle.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index f9a48a898..37afa6cb8 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -1222,7 +1222,10 @@ void CheckVehicleBreakdown(Vehicle *v) int rel, rel_old; /* decrease reliability */ - v->reliability = rel = max((rel_old = v->reliability) - v->reliability_spd_dec, 0); + if (!_settings_game.order.no_servicing_if_no_breakdowns || + _settings_game.difficulty.vehicle_breakdowns != 0) { + v->reliability = rel = max((rel_old = v->reliability) - v->reliability_spd_dec, 0); + } if ((rel_old >> 8) != (rel >> 8)) SetWindowDirty(WC_VEHICLE_DETAILS, v->index); if (v->breakdown_ctr != 0 || (v->vehstatus & VS_STOPPED) || |