From 302772883ce9dd965ca6dfe9ade85530c6de8210 Mon Sep 17 00:00:00 2001 From: bjarni Date: Sat, 2 Sep 2006 22:47:45 +0000 Subject: (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 --- roadveh_cmd.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'roadveh_cmd.c') diff --git a/roadveh_cmd.c b/roadveh_cmd.c index 70dadb89b..0b37503e4 100644 --- a/roadveh_cmd.c +++ b/roadveh_cmd.c @@ -380,6 +380,8 @@ int32 CmdSendRoadVehToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) if (v->vehstatus & VS_CRASHED) return CMD_ERROR; + if (IsRoadVehInDepot(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)) { -- cgit v1.2.3-54-g00ecf