summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-05-27 17:27:07 +0000
committermaedhros <maedhros@openttd.org>2007-05-27 17:27:07 +0000
commitd07b57f9aae88fee6ce89978cbf7aae2c4497dac (patch)
tree4e3a75bd786007788fe147816c2215605aa63f51
parentcbcd24f562c81b02aaeec1c777e628f5a21a8211 (diff)
downloadopenttd-d07b57f9aae88fee6ce89978cbf7aae2c4497dac.tar.xz
(svn r9959) -Fix: Only call GetNextVehicle for trains.
-rw-r--r--src/vehicle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index a8b51ece0..0d30cf263 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -1872,7 +1872,7 @@ int32 CmdCloneVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
}
} 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