mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-22 15:11:54 +00:00
(svn r11362) -Fix [FS#1380]: cloning vehicles with non-standard sub-cargotypes (i.e. livery refits) failed.
This commit is contained in:
parent
b4f0837d3b
commit
6cc287c669
@ -1804,7 +1804,7 @@ CommandCost CmdCloneVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
|||||||
if (flags & DC_EXEC) {
|
if (flags & DC_EXEC) {
|
||||||
assert(w != NULL);
|
assert(w != NULL);
|
||||||
|
|
||||||
if (w->cargo_type != v->cargo_type || w->cargo_subtype != v->cargo_type) {
|
if (w->cargo_type != v->cargo_type || w->cargo_subtype != v->cargo_subtype) {
|
||||||
cost = DoCommand(0, w->index, v->cargo_type | (v->cargo_subtype << 8) | 1U << 16 , flags, GetCmdRefitVeh(v));
|
cost = DoCommand(0, w->index, v->cargo_type | (v->cargo_subtype << 8) | 1U << 16 , flags, GetCmdRefitVeh(v));
|
||||||
if (CmdSucceeded(cost)) total_cost.AddCost(cost);
|
if (CmdSucceeded(cost)) total_cost.AddCost(cost);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user