(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
This commit is contained in:
bjarni
2006-09-02 22:47:45 +00:00
parent 07199603b4
commit 302772883c
4 changed files with 9 additions and 1 deletions

View File

@@ -1018,6 +1018,8 @@ int32 CmdSendShipToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (v->vehstatus & VS_CRASHED) return CMD_ERROR;
if (IsShipInDepot(v)) return CMD_ERROR;
/* If the current orders are already goto-depot */
if (v->current_order.type == OT_GOTO_DEPOT) {
if (!!(p2 & DEPOT_SERVICE) == HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {