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
commit6a341663cc5646fe544fc45db2e1e77a57eeacfa (patch)
tree2cfe4fc5636302df5f76cf2c1bdc6c68ae26ada1
parent1b43dec1d6cb5363b9de63b1646f7952abf5fa8a (diff)
downloadopenttd-6a341663cc5646fe544fc45db2e1e77a57eeacfa.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;
}