(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!
--- 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;
}