diff options
author | rubidium <rubidium@openttd.org> | 2010-08-28 14:01:50 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-08-28 14:01:50 +0000 |
commit | 702cc96943a5ffb52fd59718075667044a86775e (patch) | |
tree | 664c3d9d8f3c12642153ef9e17de0f5658d02876 /src/aircraft_cmd.cpp | |
parent | 2c1ffd79f171ab679277821f25a5013d66324984 (diff) | |
download | openttd-702cc96943a5ffb52fd59718075667044a86775e.tar.xz |
(svn r20644) -Codechange [FS#4086]: unify the vehicle breakdown code (Hirundo)
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r-- | src/aircraft_cmd.cpp | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index 48c6f5fe1..3b7b9044a 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -1038,20 +1038,6 @@ static bool HandleCrashedAircraft(Aircraft *v) return true; } -static void HandleBrokenAircraft(Aircraft *v) -{ - if (v->breakdown_ctr != 1) { - v->breakdown_ctr = 1; - v->vehstatus |= VS_AIRCRAFT_BROKEN; - - if (v->breakdowns_since_last_service != 255) { - v->breakdowns_since_last_service++; - } - SetWindowDirty(WC_VEHICLE_VIEW, v->index); - SetWindowDirty(WC_VEHICLE_DETAILS, v->index); - } -} - static void HandleAircraftSmoke(Aircraft *v) { @@ -1792,7 +1778,7 @@ static bool AircraftEventHandler(Aircraft *v, int loop) /* aircraft is broken down? */ if (v->breakdown_ctr != 0) { if (v->breakdown_ctr <= 2) { - HandleBrokenAircraft(v); + v->HandleBreakdown(); } else { if (!v->current_order.IsType(OT_LOADING)) v->breakdown_ctr--; } |