summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2006-12-30 21:41:15 +0000
committerrubidium <rubidium@openttd.org>2006-12-30 21:41:15 +0000
commita85c398902f4a94e8b594aa98cb2f5db56292fef (patch)
treeda192b40c5c347417036955f5db7224177ddb80a
parent97cdc6e2a4098f7089a36f441ce3dcf8f9db44b2 (diff)
downloadopenttd-a85c398902f4a94e8b594aa98cb2f5db56292fef.tar.xz
(svn r7657) -Fix (r6291): 'Goto Depot' did not work for helicopters going to an airport without depot (mart3p).
-rw-r--r--aircraft_cmd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/aircraft_cmd.c b/aircraft_cmd.c
index e0613e3e7..bbc3aa4db 100644
--- a/aircraft_cmd.c
+++ b/aircraft_cmd.c
@@ -543,7 +543,6 @@ int32 CmdSendAircraftToHangar(TileIndex tile, uint32 flags, uint32 p1, uint32 p2
if (!IsValidStation(st) || st->airport_tile == 0 || GetAirport(st->airport_type)->nof_depots == 0) {
StationID station;
- if (!(p2 & DEPOT_LOCATE_HANGAR)) return CMD_ERROR;
// the aircraft has to search for a hangar on its own
station = FindNearestHangar(v);
@@ -561,7 +560,7 @@ int32 CmdSendAircraftToHangar(TileIndex tile, uint32 flags, uint32 p1, uint32 p2
v->current_order.refit_cargo = CT_INVALID;
v->current_order.dest = next_airport_index;
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
- if (p2 & DEPOT_LOCATE_HANGAR || (p2 & DEPOT_SERVICE && v->u.air.state == FLYING && !next_airport_has_hangar)) {
+ if (v->u.air.state == FLYING && !next_airport_has_hangar) {
/* The aircraft is now heading for a different hangar than the next in the orders */
AircraftNextAirportPos_and_Order(v);
v->u.air.targetairport = next_airport_index;