summaryrefslogtreecommitdiff
path: root/src/company_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-12-22 21:38:03 +0000
committerrubidium <rubidium@openttd.org>2008-12-22 21:38:03 +0000
commitbdd92008cf1506823baba4d83d4d59b185b3decf (patch)
treee370db6a1822a7b0bfa9e55ce0a5bafcb588daf2 /src/company_cmd.cpp
parent7403790ba4433f99b92a563e7a1a5045e734bef2 (diff)
downloadopenttd-bdd92008cf1506823baba4d83d4d59b185b3decf.tar.xz
(svn r14718) -Change: remove some direct network core variable accesses from non-network locations.
Diffstat (limited to 'src/company_cmd.cpp')
-rw-r--r--src/company_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp
index fd56806b6..525c95967 100644
--- a/src/company_cmd.cpp
+++ b/src/company_cmd.cpp
@@ -821,7 +821,7 @@ CommandCost CmdCompanyCtrl(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
/* A new company could not be created, revert to being a spectator */
if (c == NULL) {
if (_network_server) {
- NetworkClientInfo *ci = &_network_client_info[cid];
+ NetworkClientInfo *ci = NetworkFindClientInfoFromIndex(cid);
ci->client_playas = COMPANY_SPECTATOR;
NetworkUpdateClientInfo(ci->client_id);
} else if (_local_company == COMPANY_SPECTATOR) {
@@ -857,7 +857,7 @@ CommandCost CmdCompanyCtrl(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
/* XXX - UGLY! p2 (pid) is mis-used to fetch the client-id, done at
* server-side in network_server.c:838, function
* DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_COMMAND) */
- NetworkClientInfo *ci = &_network_client_info[cid];
+ NetworkClientInfo *ci = NetworkFindClientInfoFromIndex(cid);
ci->client_playas = c->index;
NetworkUpdateClientInfo(ci->client_id);