From e4d318addcb01d01f040fc8ea8756f428bd3fc01 Mon Sep 17 00:00:00 2001 From: maedhros Date: Thu, 16 Aug 2007 18:01:27 +0000 Subject: [PATCH] (svn r10924) -Fix [FS#1120]: VS_STOPPED is only set for the front part of an articulated road vehicle, so don't check any other parts when testing if the vehicle is stopped inside a depot. --- src/roadveh_cmd.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 5050fcb78f..ceb3d947de 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -335,7 +335,8 @@ static bool CheckRoadVehInDepotStopped(const Vehicle *v) { TileIndex tile = v->tile; - if (!IsTileDepotType(tile, TRANSPORT_ROAD) || !(v->vehstatus & VS_STOPPED)) return false; + if (!IsTileDepotType(tile, TRANSPORT_ROAD)) return false; + if (IsRoadVehFront(v) && !(v->vehstatus & VS_STOPPED)) return false; for (; v != NULL; v = v->next) { if (v->u.road.state != RVSB_IN_DEPOT || v->tile != tile) return false;