diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -1274,7 +1274,7 @@ void HandleMissingAircraftOrders(Aircraf const Station *st = GetTargetAirportIfValid(v); if (st == nullptr) { Backup cur_company(_current_company, v->owner, FILE_LINE); - CommandCost ret = DoCommand(v->tile, v->index, 0, DC_EXEC, CMD_SEND_VEHICLE_TO_DEPOT); + CommandCost ret = DoCommand(DC_EXEC, CMD_SEND_VEHICLE_TO_DEPOT, v->tile, v->index, 0); cur_company.Restore(); if (ret.Failed()) CrashAirplane(v); @@ -1637,7 +1637,7 @@ static void AircraftEventHandler_HeliTak /* Send the helicopter to a hangar if needed for replacement */ if (v->NeedsAutomaticServicing()) { Backup cur_company(_current_company, v->owner, FILE_LINE); - DoCommand(v->tile, v->index | DEPOT_SERVICE | DEPOT_LOCATE_HANGAR, 0, DC_EXEC, CMD_SEND_VEHICLE_TO_DEPOT); + DoCommand(DC_EXEC, CMD_SEND_VEHICLE_TO_DEPOT, v->tile, v->index | DEPOT_SERVICE | DEPOT_LOCATE_HANGAR, 0); cur_company.Restore(); } } @@ -1688,7 +1688,7 @@ static void AircraftEventHandler_Landing /* check if the aircraft needs to be replaced or renewed and send it to a hangar if needed */ if (v->NeedsAutomaticServicing()) { Backup cur_company(_current_company, v->owner, FILE_LINE); - DoCommand(v->tile, v->index | DEPOT_SERVICE, 0, DC_EXEC, CMD_SEND_VEHICLE_TO_DEPOT); + DoCommand(DC_EXEC, CMD_SEND_VEHICLE_TO_DEPOT, v->tile, v->index | DEPOT_SERVICE, 0); cur_company.Restore(); } }