diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-10-03 17:15:48 +0200 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-12-16 22:28:32 +0100 |
commit | 549caca39cebc8c988f4e51d79d353cab4646d58 (patch) | |
tree | 6739fb0721fae36d6fc58eabd4be642062386dee /src/autoreplace_gui.cpp | |
parent | b6933a2ebdf66c5fb23b2226d3ce07d71426d7d2 (diff) | |
download | openttd-549caca39cebc8c988f4e51d79d353cab4646d58.tar.xz |
Codechange: Move command arguments to the back of the networked command function calls.
Diffstat (limited to 'src/autoreplace_gui.cpp')
-rw-r--r-- | src/autoreplace_gui.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index 898b4e750..d4e392c97 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -217,7 +217,7 @@ class ReplaceVehicleWindow : public Window { { EngineID veh_from = this->sel_engine[0]; EngineID veh_to = this->sel_engine[1]; - DoCommandP(0, (replace_when_old ? 1 : 0) | (this->sel_group << 16), veh_from + (veh_to << 16), CMD_SET_AUTOREPLACE); + DoCommandP(CMD_SET_AUTOREPLACE, 0, (replace_when_old ? 1 : 0) | (this->sel_group << 16), veh_from + (veh_to << 16)); } public: @@ -541,10 +541,10 @@ public: case WID_RV_TRAIN_WAGONREMOVE_TOGGLE: { const Group *g = Group::GetIfValid(this->sel_group); if (g != nullptr) { - DoCommandP(0, this->sel_group | (GroupFlags::GF_REPLACE_WAGON_REMOVAL << 16), (HasBit(g->flags, GroupFlags::GF_REPLACE_WAGON_REMOVAL) ? 0 : 1) | (_ctrl_pressed << 1), CMD_SET_GROUP_FLAG); + DoCommandP(CMD_SET_GROUP_FLAG, 0, this->sel_group | (GroupFlags::GF_REPLACE_WAGON_REMOVAL << 16), (HasBit(g->flags, GroupFlags::GF_REPLACE_WAGON_REMOVAL) ? 0 : 1) | (_ctrl_pressed << 1)); } else { // toggle renew_keep_length - DoCommandP(0, 0, Company::Get(_local_company)->settings.renew_keep_length ? 0 : 1, CMD_CHANGE_COMPANY_SETTING, nullptr, "company.renew_keep_length"); + DoCommandP(CMD_CHANGE_COMPANY_SETTING, 0, 0, Company::Get(_local_company)->settings.renew_keep_length ? 0 : 1, "company.renew_keep_length"); } break; } @@ -562,7 +562,7 @@ public: case WID_RV_STOP_REPLACE: { // Stop replacing EngineID veh_from = this->sel_engine[0]; - DoCommandP(0, this->sel_group << 16, veh_from + (INVALID_ENGINE << 16), CMD_SET_AUTOREPLACE); + DoCommandP(CMD_SET_AUTOREPLACE, 0, this->sel_group << 16, veh_from + (INVALID_ENGINE << 16)); break; } @@ -584,7 +584,7 @@ public: if (click_side == 0 && _ctrl_pressed && e != INVALID_ENGINE && (GetGroupNumEngines(_local_company, sel_group, e) == 0 || GetGroupNumEngines(_local_company, ALL_GROUP, e) == 0)) { EngineID veh_from = e; - DoCommandP(0, this->sel_group << 16, veh_from + (INVALID_ENGINE << 16), CMD_SET_AUTOREPLACE); + DoCommandP(CMD_SET_AUTOREPLACE, 0, this->sel_group << 16, veh_from + (INVALID_ENGINE << 16)); break; } |