src/aircraft_cmd.cpp
changeset 6592 858b2cfd266b
parent 6590 256bc777b83c
child 6594 9673331eb174
--- a/src/aircraft_cmd.cpp	Mon May 07 11:24:23 2007 +0000
+++ b/src/aircraft_cmd.cpp	Mon May 07 13:26:10 2007 +0000
@@ -227,9 +227,9 @@
 	height = spr->height;
 }
 
-static int32 EstimateAircraftCost(const AircraftVehicleInfo *avi)
+static int32 EstimateAircraftCost(EngineID engine, const AircraftVehicleInfo *avi)
 {
-	return avi->base_cost * (_price.aircraft_base >> 3) >> 5;
+	return GetEngineProperty(engine, 0x0B, avi->base_cost) * (_price.aircraft_base >> 3) >> 5;
 }
 
 
@@ -270,7 +270,7 @@
 	if (!IsEngineBuildable(p1, VEH_AIRCRAFT, _current_player)) return_cmd_error(STR_AIRCRAFT_NOT_AVAILABLE);
 
 	const AircraftVehicleInfo *avi = AircraftVehInfo(p1);
-	int32 value = EstimateAircraftCost(avi);
+	int32 value = EstimateAircraftCost(p1, avi);
 
 	/* to just query the cost, it is not neccessary to have a valid tile (automation/AI) */
 	if (flags & DC_QUERY_COST) return value;