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/economy.cpp | |
parent | 2637c06f88ed6f9dea55449883f42a62c30f19d8 (diff) | |
download | openttd-21675ec7e22bfe53f20300cc27b4d50c84aeb4dc.tar.xz |
Codechange: Un-bitstuff vehicle/engine commands.
Diffstat (limited to 'src/economy.cpp')
-rw-r--r-- | src/economy.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/economy.cpp b/src/economy.cpp index 8bf608a86..5c7c2cee5 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -451,7 +451,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner) * However, do not rely on that behaviour. */ int interval = CompanyServiceInterval(new_company, v->type); - Command<CMD_CHANGE_SERVICE_INT>::Do(DC_EXEC | DC_BANKRUPT, v->tile, v->index, interval | (new_company->settings.vehicle.servint_ispercent << 17), {}); + Command<CMD_CHANGE_SERVICE_INT>::Do(DC_EXEC | DC_BANKRUPT, v->index, interval, false, new_company->settings.vehicle.servint_ispercent); } v->owner = new_owner; @@ -1488,7 +1488,7 @@ static void HandleStationRefit(Vehicle *v, CargoArray &consist_capleft, Station if (st->goods[cid].cargo.HasCargoFor(next_station)) { /* Try to find out if auto-refitting would succeed. In case the refit is allowed, * the returned refit capacity will be greater than zero. */ - Command<CMD_REFIT_VEHICLE>::Do(DC_QUERY_COST, v_start->tile, v_start->index, cid | 1U << 24 | 0xFF << 8 | 1U << 16, {}); // Auto-refit and only this vehicle including artic parts. + Command<CMD_REFIT_VEHICLE>::Do(DC_QUERY_COST, v_start->index, cid, 0xFF, true, false, 1); // Auto-refit and only this vehicle including artic parts. /* Try to balance different loadable cargoes between parts of the consist, so that * all of them can be loaded. Avoid a situation where all vehicles suddenly switch * to the first loadable cargo for which there is only one packet. If the capacities @@ -1511,7 +1511,7 @@ static void HandleStationRefit(Vehicle *v, CargoArray &consist_capleft, Station * "via any station" before reserving. We rather produce some more "any station" cargo than * misrouting it. */ IterateVehicleParts(v_start, ReturnCargoAction(st, INVALID_STATION)); - CommandCost cost = Command<CMD_REFIT_VEHICLE>::Do(DC_EXEC, v_start->tile, v_start->index, new_cid | 1U << 24 | 0xFF << 8 | 1U << 16, {}); // Auto-refit and only this vehicle including artic parts. + CommandCost cost = Command<CMD_REFIT_VEHICLE>::Do(DC_EXEC, v_start->index, new_cid, 0xFF, true, false, 1); // Auto-refit and only this vehicle including artic parts. if (cost.Succeeded()) v->First()->profit_this_year -= cost.GetCost() << 8; } |