diff options
author | rubidium <rubidium@openttd.org> | 2008-12-23 12:26:19 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-12-23 12:26:19 +0000 |
commit | fb7ccc6820f2d4d6ec1a72f39210f06f8c22b323 (patch) | |
tree | ebd80839e8c9aa6f9d6f3c723dc76afcdb076693 /src/network | |
parent | f8f7febe41311ff3562c57a10672e3a62174104b (diff) | |
download | openttd-fb7ccc6820f2d4d6ec1a72f39210f06f8c22b323.tar.xz |
(svn r14726) -Fix (r14720): making new companies in network kinda failed...
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/network_client.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp index 9c3e2639a..f4d49539e 100644 --- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -420,8 +420,11 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_CLIENT_INFO) } // We don't have this client_id yet, find an empty client_id, and put the data there - ci = NetworkFindClientInfoFromClientID(INVALID_CLIENT_ID); - if (ci != NULL) { + for (int i = 0; i < MAX_CLIENT_SLOTS; i++) { + ci = GetNetworkClientInfo(i); + if (!ci->IsValid()) break; + } + if (ci != GetNetworkClientInfo(MAX_CLIENT_SLOTS)) { ci->client_id = client_id; ci->client_playas = playas; |