(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

pull/155/head
rubidium 14 years ago
parent 318ec9b545
commit 0a703ae70a

@ -453,8 +453,6 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_CLIENT_INFO)
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 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_CLIENT_INFO)
/* 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));

Loading…
Cancel
Save