From 93c61b9e8f91f3fc6b5cd77c76b4e461216f13ef Mon Sep 17 00:00:00 2001 From: truelight Date: Wed, 6 Apr 2005 15:39:18 +0000 Subject: (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! --- vehicle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vehicle.c') 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; } -- cgit v1.2.3-70-g09d2