(svn r10284) -Fix [FS#899]: in the unlucky event 2 clients join at the same time to start a new company while there is only one spot left, all clients became spectator. Now only make either one of the joining clients spectator (much more game-friendly ;))
authortruelight
Fri, 22 Jun 2007 22:14:42 +0000
changeset 7021 52b83eb6cc88
parent 7020 f59d32034735
child 7022 b2a065911b24
(svn r10284) -Fix [FS#899]: in the unlucky event 2 clients join at the same time to start a new company while there is only one spot left, all clients became spectator. Now only make either one of the joining clients spectator (much more game-friendly ;))
src/players.cpp
--- a/src/players.cpp	Fri Jun 22 21:48:41 2007 +0000
+++ b/src/players.cpp	Fri Jun 22 22:14:42 2007 +0000
@@ -840,12 +840,10 @@
 				NetworkClientInfo *ci = &_network_client_info[cid];
 				ci->client_playas = PLAYER_SPECTATOR;
 				NetworkUpdateClientInfo(ci->client_index);
-			} else
+			} else if (_local_player == PLAYER_SPECATOR) {
+				_network_playas = PLAYER_SPECTATOR;
+			}
 #endif /* ENABLE_NETWORK */
-			{
-				_network_playas = PLAYER_SPECTATOR;
-				SetLocalPlayer(PLAYER_SPECTATOR);
-			}
 			break;
 		}