1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2025-12-10 06:52:05 +01:00

Fix a46a3a97f3: Incorrect parameter order for CmdSetCompanyManagerFace.

Style and bits were mixed up. Switch everything to style first, as the most significant parameter.
This commit is contained in:
Peter Nelson
2025-10-03 17:35:47 +01:00
committed by Peter Nelson
parent bf3a07c5d2
commit 75ca1e3cda
2 changed files with 4 additions and 4 deletions

View File

@@ -925,7 +925,7 @@ CommandCost CmdCompanyCtrl(DoCommandFlags flags, CompanyCtrlAction cca, CompanyI
if (!_company_manager_face.empty()) {
auto cmf = ParseCompanyManagerFaceCode(_company_manager_face);
if (cmf.has_value()) {
Command<CMD_SET_COMPANY_MANAGER_FACE>::SendNet(STR_NULL, c->index, cmf->bits, cmf->style);
Command<CMD_SET_COMPANY_MANAGER_FACE>::SendNet(STR_NULL, c->index, cmf->style, cmf->bits);
}
}
@@ -1050,11 +1050,11 @@ CommandCost CmdCompanyAllowListCtrl(DoCommandFlags flags, CompanyAllowListCtrlAc
/**
* Change the company manager's face.
* @param flags operation to perform
* @param bits The bits of company manager face.
* @param style The style of the company manager face.
* @param bits The bits of company manager face.
* @return the cost of this operation or an error
*/
CommandCost CmdSetCompanyManagerFace(DoCommandFlags flags, uint32_t bits, uint style)
CommandCost CmdSetCompanyManagerFace(DoCommandFlags flags, uint style, uint32_t bits)
{
CompanyManagerFace tmp_face{style, bits, {}};
if (!IsValidCompanyManagerFace(tmp_face)) return CMD_ERROR;

View File

@@ -1384,7 +1384,7 @@ public:
/* OK button */
case WID_SCMF_ACCEPT:
Command<CMD_SET_COMPANY_MANAGER_FACE>::Post(this->face.bits, this->face.style);
Command<CMD_SET_COMPANY_MANAGER_FACE>::Post(this->face.style, this->face.bits);
[[fallthrough]];
/* Cancel button */