diff options
author | yexo <yexo@openttd.org> | 2009-04-20 23:49:27 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2009-04-20 23:49:27 +0000 |
commit | 61d883e7e5bf2cd7d946725017fe4163d640fbb6 (patch) | |
tree | 03a133c9b29e5690f1470e530117c0ee9b05614f /src/order_cmd.cpp | |
parent | a664a2668cdfc0901ce2bf75b698960fab18d9c0 (diff) | |
download | openttd-61d883e7e5bf2cd7d946725017fe4163d640fbb6.tar.xz |
(svn r16107) -Add [NoAI]: AIOF_STOP_IN_DEPOT to the orderflags in AIOrder to allow stop-in-depot orders
Diffstat (limited to 'src/order_cmd.cpp')
-rw-r--r-- | src/order_cmd.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index a1a94cd8e..c2736b26c 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -512,7 +512,8 @@ CommandCost CmdInsertOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 if (new_order.GetNonStopType() != ONSF_STOP_EVERYWHERE && v->type != VEH_TRAIN && v->type != VEH_ROAD) return CMD_ERROR; if (new_order.GetDepotOrderType() & ~(ODTFB_PART_OF_ORDERS | ((new_order.GetDepotOrderType() & ODTFB_PART_OF_ORDERS) != 0 ? ODTFB_SERVICE : 0))) return CMD_ERROR; - if (new_order.GetDepotActionType() & ~ODATFB_NEAREST_DEPOT) return CMD_ERROR; + if (new_order.GetDepotActionType() & ~(ODATFB_HALT | ODATFB_NEAREST_DEPOT)) return CMD_ERROR; + if ((new_order.GetDepotOrderType() & ODTFB_SERVICE) && (new_order.GetDepotActionType() & ODATFB_HALT)) return CMD_ERROR; break; } |