diff options
author | frosch <frosch@openttd.org> | 2011-04-10 10:47:21 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-04-10 10:47:21 +0000 |
commit | 5bf90860f8af2c648c2704f29e1c9ac28deddd55 (patch) | |
tree | 4dd6a62700c30a7956213bc231e10814a63e9c61 /src/aircraft_cmd.cpp | |
parent | d1a50a01b46684486428a2b63959cb160a016c39 (diff) | |
download | openttd-5bf90860f8af2c648c2704f29e1c9ac28deddd55.tar.xz |
(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.
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r-- | src/aircraft_cmd.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index 098e30c44..a330280be 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -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; |