summaryrefslogtreecommitdiff
path: root/aircraft_cmd.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-09-02 22:47:45 +0000
committerbjarni <bjarni@openttd.org>2006-09-02 22:47:45 +0000
commit302772883ce9dd965ca6dfe9ade85530c6de8210 (patch)
tree864702554fea3f8634aab76b6bd5d2d495093735 /aircraft_cmd.c
parent07199603b44327b9436ef0f878151a66243b45da (diff)
downloadopenttd-302772883ce9dd965ca6dfe9ade85530c6de8210.tar.xz
(svn r6352) -Fix: FS#322 Send to depot bug
now vehicles can't be sent to a depot when they are already inside a depot before they would remember the order and try to turn around when leaving the depot
Diffstat (limited to 'aircraft_cmd.c')
-rw-r--r--aircraft_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/aircraft_cmd.c b/aircraft_cmd.c
index f6c991044..795a08540 100644
--- a/aircraft_cmd.c
+++ b/aircraft_cmd.c
@@ -509,7 +509,7 @@ int32 CmdSendAircraftToHangar(TileIndex tile, uint32 flags, uint32 p1, uint32 p2
v = GetVehicle(p1);
- if (v->type != VEH_Aircraft || !CheckOwnership(v->owner)) return CMD_ERROR;
+ if (v->type != VEH_Aircraft || !CheckOwnership(v->owner) || IsAircraftInHangar(v)) return CMD_ERROR;
if (v->current_order.type == OT_GOTO_DEPOT && !(p2 & DEPOT_LOCATE_HANGAR)) {
if (!!(p2 & DEPOT_SERVICE) == HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {