diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-11-05 23:55:23 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-12-16 22:28:32 +0100 |
commit | 21675ec7e22bfe53f20300cc27b4d50c84aeb4dc (patch) | |
tree | bfc6a1ef650ac6def3b80f86ec8d1a424900f459 /src/aircraft_cmd.cpp | |
parent | 2637c06f88ed6f9dea55449883f42a62c30f19d8 (diff) | |
download | openttd-21675ec7e22bfe53f20300cc27b4d50c84aeb4dc.tar.xz |
Codechange: Un-bitstuff vehicle/engine commands.
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r-- | src/aircraft_cmd.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index f1263f00c..f0a50b012 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -1275,7 +1275,7 @@ void HandleMissingAircraftOrders(Aircraft *v) const Station *st = GetTargetAirportIfValid(v); if (st == nullptr) { Backup<CompanyID> cur_company(_current_company, v->owner, FILE_LINE); - CommandCost ret = Command<CMD_SEND_VEHICLE_TO_DEPOT>::Do(DC_EXEC, v->tile, v->index, 0, {}); + CommandCost ret = Command<CMD_SEND_VEHICLE_TO_DEPOT>::Do(DC_EXEC, v->index, DepotCommand::None, {}); cur_company.Restore(); if (ret.Failed()) CrashAirplane(v); @@ -1638,7 +1638,7 @@ static void AircraftEventHandler_HeliTakeOff(Aircraft *v, const AirportFTAClass /* Send the helicopter to a hangar if needed for replacement */ if (v->NeedsAutomaticServicing()) { Backup<CompanyID> cur_company(_current_company, v->owner, FILE_LINE); - Command<CMD_SEND_VEHICLE_TO_DEPOT>::Do(DC_EXEC, v->tile, v->index | DEPOT_SERVICE | DEPOT_LOCATE_HANGAR, 0, {}); + Command<CMD_SEND_VEHICLE_TO_DEPOT>::Do(DC_EXEC, v->index, DepotCommand::Service | DepotCommand::LocateHangar, {}); cur_company.Restore(); } } @@ -1689,7 +1689,7 @@ static void AircraftEventHandler_Landing(Aircraft *v, const AirportFTAClass *apc /* check if the aircraft needs to be replaced or renewed and send it to a hangar if needed */ if (v->NeedsAutomaticServicing()) { Backup<CompanyID> cur_company(_current_company, v->owner, FILE_LINE); - Command<CMD_SEND_VEHICLE_TO_DEPOT>::Do(DC_EXEC, v->tile, v->index | DEPOT_SERVICE, 0, {}); + Command<CMD_SEND_VEHICLE_TO_DEPOT>::Do(DC_EXEC, v->index, DepotCommand::Service, {}); cur_company.Restore(); } } |