changeset 7450:71fc4153a338 draft

(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.
author maedhros <maedhros@openttd.org>
date Thu, 16 Aug 2007 18:01:27 +0000
parents ea9ba0b00085
children ded56bdcece9
files src/roadveh_cmd.cpp
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -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;