(svn r9959) -Fix: Only call GetNextVehicle for trains.
authormaedhros
Sun, 27 May 2007 17:27:07 +0000
changeset 6727 7b016b7e17af
parent 6726 35d694ec0d24
child 6728 61568a945b40
(svn r9959) -Fix: Only call GetNextVehicle for trains.
src/vehicle.cpp
--- a/src/vehicle.cpp	Sun May 27 14:42:40 2007 +0000
+++ b/src/vehicle.cpp	Sun May 27 17:27:07 2007 +0000
@@ -1872,7 +1872,7 @@
 			}
 		} while (v->type == VEH_TRAIN && EngineHasArticPart(v) && (v = GetNextArticPart(v)) != NULL);
 
-		if (flags & DC_EXEC) w = GetNextVehicle(w);
+		if ((flags & DC_EXEC) && v->type == VEH_TRAIN) w = GetNextVehicle(w);
 	} while (v->type == VEH_TRAIN && (v = GetNextVehicle(v)) != NULL);
 
 	/* Since we can't estimate the cost of cloning a vehicle accurately we must