diff options
author | maedhros <maedhros@openttd.org> | 2007-05-27 17:27:07 +0000 |
---|---|---|
committer | maedhros <maedhros@openttd.org> | 2007-05-27 17:27:07 +0000 |
commit | 710cc5a5979e76d84ef598483ebdba62963d75e9 (patch) | |
tree | 4e3a75bd786007788fe147816c2215605aa63f51 | |
parent | 7f0339748ff6734447237e7646e2411b90c8bf07 (diff) | |
download | openttd-710cc5a5979e76d84ef598483ebdba62963d75e9.tar.xz |
(svn r9959) -Fix: Only call GetNextVehicle for trains.
-rw-r--r-- | src/vehicle.cpp | 2 |
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 |