From b6b9cd9d51de7213f3d8d6fa73f341cfc28a1424 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 17 Aug 2008 11:04:37 +0000 Subject: (svn r14089) -Fix [FS#2219]: trains not being able to find a route to a depot when the front is already in the depot. --- src/vehicle.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/vehicle.cpp') diff --git a/src/vehicle.cpp b/src/vehicle.cpp index bd64a4d69..ce9d6caa6 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -2496,7 +2496,7 @@ CommandCost Vehicle::SendToDepot(uint32 flags, DepotCommand command) { if (!CheckOwnership(this->owner)) return CMD_ERROR; if (this->vehstatus & VS_CRASHED) return CMD_ERROR; - if (this->IsInDepot()) return CMD_ERROR; + if (this->IsStoppedInDepot()) return CMD_ERROR; if (this->current_order.IsType(OT_GOTO_DEPOT)) { bool halt_in_depot = this->current_order.GetDepotActionType() & ODATFB_HALT; @@ -2524,10 +2524,6 @@ CommandCost Vehicle::SendToDepot(uint32 flags, DepotCommand command) return CommandCost(); } - /* check if at a standstill (not stopped only) in a depot - * the check is down here to make it possible to alter stop/service for trains entering the depot */ - if (this->type == VEH_TRAIN && IsRailDepotTile(this->tile) && this->cur_speed == 0) return CMD_ERROR; - TileIndex location; DestinationID destination; bool reverse; -- cgit v1.2.3-54-g00ecf