From 2fe8e89a45c90a1bced09e8fbcfc7e5b526d54ed Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 10 Dec 2011 21:09:21 +0000 Subject: (svn r23487) -Change/Fix: Make autoreplace, autorenew, cloning and autorefit check all articulated parts of a vehicle to find a shared cargo subtype. --- src/vehicle_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vehicle_cmd.cpp') diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp index 4293e5f75..146b81659 100644 --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -842,7 +842,7 @@ CommandCost CmdCloneVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint assert(w != NULL); /* Find out what's the best sub type */ - byte subtype = GetBestFittingSubType(v, w); + byte subtype = GetBestFittingSubType(v, w, v->cargo_type); if (w->cargo_type != v->cargo_type || w->cargo_subtype != subtype) { CommandCost cost = DoCommand(0, w->index, v->cargo_type | 1U << 7 | (subtype << 8), flags, GetCmdRefitVeh(v)); if (cost.Succeeded()) total_cost.AddCost(cost); -- cgit v1.2.3-54-g00ecf