(svn r20645) -Codechange [FS#4086]: unify the code for checking for breakdown handling as well (Hirundo)

This commit is contained in:
rubidium
2010-08-28 14:14:37 +00:00
parent 702cc96943
commit 2fb18e975c
6 changed files with 17 additions and 34 deletions

View File

@@ -1775,14 +1775,7 @@ static bool AircraftEventHandler(Aircraft *v, int loop)
if (v->vehstatus & VS_STOPPED) return true;
/* aircraft is broken down? */
if (v->breakdown_ctr != 0) {
if (v->breakdown_ctr <= 2) {
v->HandleBreakdown();
} else {
if (!v->current_order.IsType(OT_LOADING)) v->breakdown_ctr--;
}
}
v->HandleBreakdown();
HandleAircraftSmoke(v);
ProcessOrders(v);