diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-10-03 15:39:49 +0200 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-12-16 22:28:32 +0100 |
commit | b6933a2ebdf66c5fb23b2226d3ce07d71426d7d2 (patch) | |
tree | 0cb31934ea674ea3b8bb23dd118db803b319fe7c /src/script/api | |
parent | 39e8783f4b8d24a27d28f99905acf8f54dec24fa (diff) | |
download | openttd-b6933a2ebdf66c5fb23b2226d3ce07d71426d7d2.tar.xz |
Codechange: Move command arguments to the back of the DoCommand function call.
Diffstat (limited to 'src/script/api')
-rw-r--r-- | src/script/api/script_vehicle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/api/script_vehicle.cpp b/src/script/api/script_vehicle.cpp index cd5cc5af7..bbd9df55d 100644 --- a/src/script/api/script_vehicle.cpp +++ b/src/script/api/script_vehicle.cpp @@ -93,7 +93,7 @@ ::VehicleType type = ::Engine::Get(engine_id)->type; - CommandCost res = ::DoCommand(depot, engine_id | (cargo << 24), 0, DC_QUERY_COST, ::GetCmdBuildVeh(type)); + CommandCost res = ::DoCommand(DC_QUERY_COST, ::GetCmdBuildVeh(type), depot, engine_id | (cargo << 24), 0); return res.Succeeded() ? _returned_refit_capacity : -1; } @@ -142,7 +142,7 @@ if (!IsValidVehicle(vehicle_id)) return -1; if (!ScriptCargo::IsValidCargo(cargo)) return -1; - CommandCost res = ::DoCommand(0, vehicle_id, cargo, DC_QUERY_COST, GetCmdRefitVeh(::Vehicle::Get(vehicle_id))); + CommandCost res = ::DoCommand(DC_QUERY_COST, GetCmdRefitVeh(::Vehicle::Get(vehicle_id)), 0, vehicle_id, cargo); return res.Succeeded() ? _returned_refit_capacity : -1; } |