summaryrefslogtreecommitdiff
path: root/vehicle.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-11-08 17:44:17 +0000
committerpeter1138 <peter1138@openttd.org>2006-11-08 17:44:17 +0000
commit6a2583c43f806145277dad256b829f6cd4753d6c (patch)
tree8a1a406488c5e9fe2cf08d2fec2a63ae8ff13167 /vehicle.c
parent2c17c649afd9f199f571c83407820e53b5f52c7c (diff)
downloadopenttd-6a2583c43f806145277dad256b829f6cd4753d6c.tar.xz
(svn r7115) -Fix [FS#371]: Cloning a vehicle that has been refitted would incur the expense as running costs, not new vehicles.
Diffstat (limited to 'vehicle.c')
-rw-r--r--vehicle.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/vehicle.c b/vehicle.c
index 353c4b293..8d202c8d1 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -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
_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;
}