summaryrefslogtreecommitdiff
path: root/network.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-12-15 15:19:51 +0000
committertruelight <truelight@openttd.org>2004-12-15 15:19:51 +0000
commitac96c1ae07d3feb1df4dd5049d3f310ed8437b82 (patch)
tree89befd7f731a8422e3db185aa041d725963b7aad /network.c
parent70a91d6c6046bde997c0f775f6f0e9d98def7e10 (diff)
downloadopenttd-ac96c1ae07d3feb1df4dd5049d3f310ed8437b82.tar.xz
(svn r1096) -Fix: [Network] PlayAs is now registered correctly
-Codewise: [Network] Cleaned some code, removed some comment, changed some wrong comment
Diffstat (limited to 'network.c')
-rw-r--r--network.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/network.c b/network.c
index af4b3b8ea..06ee8b9ac 100644
--- a/network.c
+++ b/network.c
@@ -404,7 +404,7 @@ static ClientState *AllocClient(SOCKET s)
cs->quited = false;
if (_network_server) {
- ci = &_network_client_info[client_no];
+ ci = DEREF_CLIENT_INFO(cs);
memset(ci, 0, sizeof(*ci));
cs->index = _network_client_index++;
@@ -700,6 +700,7 @@ void NetworkInitialize(void)
_local_command_queue = NULL;
// Clean all client-sockets
+ memset(_clients, 0, sizeof(_clients));
for (cs = _clients; cs != &_clients[MAX_CLIENTS]; cs++) {
cs->socket = INVALID_SOCKET;
cs->status = STATUS_INACTIVE;