(svn r10924) -Fix [FS#1120]: VS_STOPPED is only set for the front part of an articulated
authormaedhros
Thu, 16 Aug 2007 18:01:27 +0000
changeset 7946 e53b2f085489
parent 7945 ff24db9275cd
child 7947 f3ad4a2663bc
(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
--- a/src/roadveh_cmd.cpp	Thu Aug 16 16:18:22 2007 +0000
+++ b/src/roadveh_cmd.cpp	Thu Aug 16 18:01:27 2007 +0000
@@ -335,7 +335,8 @@
 {
 	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;