Mercurial > hg > openttd
changeset 15058:caef91145ae1 draft
(svn r19680) -Fix [FS#3775] (r19648): when joining a MP game all clients with company ID > 0 would be shown as if they were a spectator
author | rubidium <rubidium@openttd.org> |
---|---|
date | Tue, 20 Apr 2010 11:29:51 +0000 |
parents | e2d2c0738c6b |
children | f94f088e4ff0 |
files | src/network/network_client.cpp |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -453,8 +453,6 @@ if (MY_CLIENT->HasClientQuit()) return NETWORK_RECV_STATUS_CONN_LOST; - if (!Company::IsValidID(playas)) playas = COMPANY_SPECTATOR; - ci = NetworkFindClientInfoFromClientID(client_id); if (ci != NULL) { if (playas == ci->client_playas && strcmp(name, ci->client_name) != 0) { @@ -467,7 +465,7 @@ /* Make sure we're in the company the server tells us to be in, * for the rare case that we get moved while joining. */ - if (client_id == _network_own_client_id) SetLocalCompany(playas); + if (client_id == _network_own_client_id) SetLocalCompany(!Company::IsValidID(playas) ? COMPANY_SPECTATOR : playas); ci->client_playas = playas; strecpy(ci->client_name, name, lastof(ci->client_name));