(svn r2156) -Fix: in revision 2104 someone forgot to add a very important check in
authortruelight
Wed, 06 Apr 2005 15:39:18 +0000
changeset 1652 201cbfba7797
parent 1651 a0083373f924
child 1653 d2db1ba2abde
(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
--- a/vehicle.c	Wed Apr 06 09:34:56 2005 +0000
+++ b/vehicle.c	Wed Apr 06 15:39:18 2005 +0000
@@ -358,7 +358,7 @@
 {
 	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;
 }