Index: src/order_cmd.cpp =================================================================== --- src/order_cmd.cpp (revision 12851) +++ src/order_cmd.cpp (working copy) @@ -1009,6 +1009,26 @@ return CommandCost(); } +/** Check if the vehicle's orders are stations it can go to + * Also used for copying/sharing orders + * @param *v check the orders of this vehicle + * @param *dst (optional) against the type of this vehicle, if left out, *v is used for this param + */ +static bool CheckAircraftCanUseStationsInOrder(Vehicle *v, Vehicle *dst = NULL) +{ + /* Normal aircraft can't copy all the orders from helicopters (and visa versa) */ + const Order *order; + + if (dst == NULL) dst = v; + + FOR_VEHICLE_ORDERS(v,order) { + const Station *st = GetStation(order->GetDestination()); + if (!CanAircraftUseStation(dst->engine_type, st)) + return false; + } + return true; +} + /** Clone/share/copy an order-list of an other vehicle. * @param tile unused * @param flags operation to perform @@ -1047,6 +1067,9 @@ return CMD_ERROR; } + if (!CheckAircraftCanUseStationsInOrder(src, dst)) + return CMD_ERROR; + /* Is the vehicle already in the shared list? */ { const Vehicle* u; @@ -1108,6 +1131,9 @@ } } + if (!CheckAircraftCanUseStationsInOrder(src, dst)) + return CMD_ERROR; + /* make sure there are orders available */ delta = dst->IsOrderListShared() ? src->num_orders + 1 : src->num_orders - dst->num_orders; if (!HasOrderPoolFree(delta))