summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/network/network_client.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp
index dc4e46691..19f07ae64 100644
--- a/src/network/network_client.cpp
+++ b/src/network/network_client.cpp
@@ -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));