diff options
Diffstat (limited to 'src/company_cmd.cpp')
-rw-r--r-- | src/company_cmd.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index 2150b43ab..9629a0cb6 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -790,7 +790,6 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 NetworkUpdateClientInfo(ci->client_id); if (Company::IsValidID(ci->client_playas)) { - CompanyID company_backup = _local_company; _network_company_states[c->index].months_empty = 0; _network_company_states[c->index].password[0] = '\0'; NetworkServerUpdateCompanyPassworded(ci->client_playas, false); @@ -806,9 +805,7 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 * TODO: Perhaps this could be improved by when the client is ready * with joining to let it send itself the command, and not the server? * For example in network_client.c:534? */ - _local_company = ci->client_playas; - NetworkSend_Command(0, 0, 0, CMD_RENAME_PRESIDENT, NULL, ci->client_name); - _local_company = company_backup; + NetworkSend_Command(0, 0, 0, CMD_RENAME_PRESIDENT, NULL, ci->client_name, ci->client_playas); } /* Announce new company on network, if the client was a SPECTATOR before */ |