(svn r7115) -Fix [FS#371]: Cloning a vehicle that has been refitted would incur the expense as running costs, not new vehicles.
authorpeter1138
Wed, 08 Nov 2006 17:44:17 +0000
changeset 5062 7c341b020f5f
parent 5061 cb097749d18f
child 5063 5d6e4e38fa43
(svn r7115) -Fix [FS#371]: Cloning a vehicle that has been refitted would incur the expense as running costs, not new vehicles.
vehicle.c
--- a/vehicle.c	Wed Nov 08 12:28:57 2006 +0000
+++ b/vehicle.c	Wed Nov 08 17:44:17 2006 +0000
@@ -1851,6 +1851,10 @@
 		// 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;
 }