mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-12 18:40:29 +00:00
Fix 148e5b41d6
: Uninitialized variable usage. (#7216)
This commit is contained in:
parent
13af2b88b4
commit
22f33fdd08
@ -1225,8 +1225,8 @@ void CheckVehicleBreakdown(Vehicle *v)
|
|||||||
if (!_settings_game.order.no_servicing_if_no_breakdowns ||
|
if (!_settings_game.order.no_servicing_if_no_breakdowns ||
|
||||||
_settings_game.difficulty.vehicle_breakdowns != 0) {
|
_settings_game.difficulty.vehicle_breakdowns != 0) {
|
||||||
v->reliability = rel = max((rel_old = v->reliability) - v->reliability_spd_dec, 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 ((rel_old >> 8) != (rel >> 8)) SetWindowDirty(WC_VEHICLE_DETAILS, v->index);
|
|
||||||
|
|
||||||
if (v->breakdown_ctr != 0 || (v->vehstatus & VS_STOPPED) ||
|
if (v->breakdown_ctr != 0 || (v->vehstatus & VS_STOPPED) ||
|
||||||
_settings_game.difficulty.vehicle_breakdowns < 1 ||
|
_settings_game.difficulty.vehicle_breakdowns < 1 ||
|
||||||
|
Loading…
Reference in New Issue
Block a user