From 782b80eff755afcf7d4b3c5f9237bc65457b4e16 Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 22 Dec 2008 12:59:31 +0000 Subject: (svn r14709) -Codechange: make a clearer distinction between 'unique' client identification ids and the indices into the clients/client info arrays. --- src/company_cmd.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/company_cmd.cpp') 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; -- cgit v1.2.3-54-g00ecf