mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r7115) -Fix [FS#371]: Cloning a vehicle that has been refitted would incur the expense as running costs, not new vehicles.
This commit is contained in:
parent
2c17c649af
commit
6a2583c43f
|
@ -1851,6 +1851,10 @@ int32 CmdCloneVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||||
// for trains this needs to be the front engine due to the callback function
|
// for trains this needs to be the front engine due to the callback function
|
||||||
_new_vehicle_id = w_front->index;
|
_new_vehicle_id = w_front->index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Set the expense type last as refitting will make the cost go towards
|
||||||
|
* running costs... */
|
||||||
|
SET_EXPENSES_TYPE(EXPENSES_NEW_VEHICLES);
|
||||||
return total_cost;
|
return total_cost;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue