--- a/vehicle.c Wed Jan 26 18:59:10 2005 +0000
+++ b/vehicle.c Wed Jan 26 19:03:01 2005 +0000
@@ -1351,6 +1351,9 @@
// check that it's the vehicle's owner that requested the replace
if (!CheckOwnership(v->owner)) return CMD_ERROR;
+ // makes sure that we do not replace a plane with a helicopter or vise versa
+ if (HASBIT(AircraftVehInfo(old_engine_type)->subtype, 0) != HASBIT(AircraftVehInfo(new_engine_type)->subtype, 0)) return CMD_ERROR;
+
switch (v->type) {
case VEH_Train: build_cost = EstimateTrainCost(RailVehInfo(new_engine_type)); break;