network_client.c
changeset 4861 f28bfa84f9ad
parent 4860 217cdf845a12
child 4878 744717de172e
--- a/network_client.c	Sun Oct 15 23:42:18 2006 +0000
+++ b/network_client.c	Sun Oct 15 23:48:34 2006 +0000
@@ -511,7 +511,8 @@
 		// 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) {