(svn r22309) -Fix: Make road vehicles, ships and aircraft skip orders if they are leaving a depot and heading to the same one again; just like trains since r16322.

This commit is contained in:
frosch
2011-04-10 10:47:21 +00:00
parent d1a50a01b4
commit 5bf90860f8
3 changed files with 25 additions and 4 deletions

View File

@@ -1311,6 +1311,12 @@ static void AircraftEventHandler_InHangar(Aircraft *v, const AirportFTAClass *ap
!v->current_order.IsType(OT_GOTO_DEPOT))
return;
/* We are leaving a hangar, but have to go to the exact same one; re-enter */
if (v->current_order.IsType(OT_GOTO_DEPOT) && v->current_order.GetDestination() == v->targetairport) {
VehicleEnterDepot(v);
return;
}
/* if the block of the next position is busy, stay put */
if (AirportHasBlock(v, &apc->layout[v->pos], apc)) return;