summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-08-16 18:01:27 +0000
committermaedhros <maedhros@openttd.org>2007-08-16 18:01:27 +0000
commit8f365e31436de029eede267c11724e6685ac5b98 (patch)
tree0ead6fd5207c9d79f32cda175541cee3b9d933f8 /src
parent857eecdc90dda6fb6ec2d42e98796b1ebee28da9 (diff)
downloadopenttd-8f365e31436de029eede267c11724e6685ac5b98.tar.xz
(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.
Diffstat (limited to 'src')
-rw-r--r--src/roadveh_cmd.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index 5050fcb78..ceb3d947d 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;