diff options
author | rubidium <rubidium@openttd.org> | 2010-01-11 20:32:32 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-01-11 20:32:32 +0000 |
commit | ebe99fd4935d54466730095e7a9f239181d5ba7b (patch) | |
tree | adaacb8e6827eaad9ad49c81905a04dca0bf8c21 /src/company_cmd.cpp | |
parent | 3e5a87a52cc8355a2a5c2831c60643bf30d41a3a (diff) | |
download | openttd-ebe99fd4935d54466730095e7a9f239181d5ba7b.tar.xz |
(svn r18784) -Codechange: make NetworkSend_Command accept a company instead of using _local_company to pass that information, with the whole mess when you don't want the company to be _local_company.
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 */ |