summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-04-06 15:39:18 +0000
committertruelight <truelight@openttd.org>2005-04-06 15:39:18 +0000
commit93c61b9e8f91f3fc6b5cd77c76b4e461216f13ef (patch)
tree2cfe4fc5636302df5f76cf2c1bdc6c68ae26ada1
parent13fc3271f4ce7552b26ebd66fb320e5eed84620b (diff)
downloadopenttd-93c61b9e8f91f3fc6b5cd77c76b4e461216f13ef.tar.xz
(svn r2156) -Fix: in revision 2104 someone forgot to add a very important check in
GetPrevVehicleInChain; this caused some nasty bugs in depots, like wagons without engines complain about not being stopped, and stuff like that. Hopefully this fixes those problems. With a big tnx to BJH for his perfect demo!
-rw-r--r--vehicle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vehicle.c b/vehicle.c
index 6881faa4e..165a4ac42 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -358,7 +358,7 @@ Vehicle *GetPrevVehicleInChain(const Vehicle *v)
{
Vehicle *u;
- FOR_ALL_VEHICLES(u) if (u->next == v) return u;
+ FOR_ALL_VEHICLES(u) if (u->type == VEH_Train && u->next == v) return u;
return NULL;
}