summaryrefslogtreecommitdiff
path: root/network_client.c
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2006-10-15 23:48:34 +0000
committerDarkvater <Darkvater@openttd.org>2006-10-15 23:48:34 +0000
commit9e8b0774265f499c8b3df789fb24f1882bb4ed10 (patch)
treeb6419eb336f33a543168cce79ecd4086674ed9c6 /network_client.c
parent23ab588a61f150a67f98c5908819ef7c1fd21a8c (diff)
downloadopenttd-9e8b0774265f499c8b3df789fb24f1882bb4ed10.tar.xz
(svn r6787) -Codechange: Use PLAYER_NEW_COMPANY as a player identifier wishing to become a
new player instead of a 0.
Diffstat (limited to 'network_client.c')
-rw-r--r--network_client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/network_client.c b/network_client.c
index 836c0611d..f9cec7feb 100644
--- a/network_client.c
+++ b/network_client.c
@@ -511,7 +511,8 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_MAP)
// Say we received the map and loaded it correctly!
SEND_COMMAND(PACKET_CLIENT_MAP_OK)();
- if (_network_playas == 0 || _network_playas > MAX_PLAYERS ||
+ // new company/spectator (invalid player) or company we want to join is not active
+ if (_network_playas == PLAYER_NEW_COMPANY || !IsValidPlayer(_network_playas - 1) ||
!GetPlayer(_network_playas - 1)->is_active) {
if (_network_playas == PLAYER_SPECTATOR) {