summaryrefslogtreecommitdiff
path: root/src/company_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-12-22 12:59:31 +0000
committerrubidium <rubidium@openttd.org>2008-12-22 12:59:31 +0000
commit782b80eff755afcf7d4b3c5f9237bc65457b4e16 (patch)
treebb6d8bbfd056eeed669e31e87f2c987bc038a42a /src/company_cmd.cpp
parent8431174e88f1996f5bedce8128d4f91fa20edcf3 (diff)
downloadopenttd-782b80eff755afcf7d4b3c5f9237bc65457b4e16.tar.xz
(svn r14709) -Codechange: make a clearer distinction between 'unique' client identification ids and the indices into the clients/client info arrays.
Diffstat (limited to 'src/company_cmd.cpp')
-rw-r--r--src/company_cmd.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp
index d8a4c73b5..463f0194c 100644
--- a/src/company_cmd.cpp
+++ b/src/company_cmd.cpp
@@ -807,9 +807,9 @@ CommandCost CmdCompanyCtrl(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
* Other client(s)/server:
* _local_company/_network_playas: what they play as
* cid = requested company/company of joining client */
- uint16 cid = p2; // ClientID
+ ClientIndex cid = (ClientIndex)p2;
- /* Has the network client a correct ClientID? */
+ /* Has the network client a correct ClientIndex? */
if (!(flags & DC_EXEC)) return CommandCost();
if (cid >= MAX_CLIENT_INFO) return CommandCost();
@@ -823,7 +823,7 @@ CommandCost CmdCompanyCtrl(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (_network_server) {
NetworkClientInfo *ci = &_network_client_info[cid];
ci->client_playas = COMPANY_SPECTATOR;
- NetworkUpdateClientInfo(ci->client_index);
+ NetworkUpdateClientInfo(ci->client_id);
} else if (_local_company == COMPANY_SPECTATOR) {
_network_playas = COMPANY_SPECTATOR;
}
@@ -859,7 +859,7 @@ CommandCost CmdCompanyCtrl(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
* DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_COMMAND) */
NetworkClientInfo *ci = &_network_client_info[cid];
ci->client_playas = c->index;
- NetworkUpdateClientInfo(ci->client_index);
+ NetworkUpdateClientInfo(ci->client_id);
if (IsValidCompanyID(ci->client_playas)) {
CompanyID company_backup = _local_company;