(svn r12795) -Fix [FS#1938]: vehicles could break down during loading and keep loading. The intention of the break down code is not to break down when having zero speed, therefor break downs now do not happen when loading.

This commit is contained in:
rubidium 2008-04-19 21:23:42 +00:00
parent c360e71e3c
commit 0e624275ee
4 changed files with 4 additions and 4 deletions

View File

@ -2086,7 +2086,7 @@ static void AircraftEventHandler(Vehicle *v, int loop)
if (v->breakdown_ctr <= 2) {
HandleBrokenAircraft(v);
} else {
v->breakdown_ctr--;
if (!v->current_order.IsType(OT_LOADING)) v->breakdown_ctr--;
}
}

View File

@ -1844,7 +1844,7 @@ static void RoadVehController(Vehicle *v)
HandleBrokenRoadVeh(v);
return;
}
v->breakdown_ctr--;
if (!v->current_order.IsType(OT_LOADING)) v->breakdown_ctr--;
}
if (v->vehstatus & VS_STOPPED) return;

View File

@ -594,7 +594,7 @@ static void ShipController(Vehicle *v)
HandleBrokenShip(v);
return;
}
v->breakdown_ctr--;
if (!v->current_order.IsType(OT_LOADING)) v->breakdown_ctr--;
}
if (v->vehstatus & VS_STOPPED) return;

View File

@ -3421,7 +3421,7 @@ static void TrainLocoHandler(Vehicle *v, bool mode)
HandleBrokenTrain(v);
return;
}
v->breakdown_ctr--;
if (!v->current_order.IsType(OT_LOADING)) v->breakdown_ctr--;
}
if (HasBit(v->u.rail.flags, VRF_REVERSING) && v->cur_speed == 0) {