Changeset - r5375:772a1c1f8fa4
[Not reviewed]
master
0 1 0
rubidium - 17 years ago 2006-12-26 11:47:31
rubidium@openttd.org
(svn r7560) -Fix (r2300): p2 is not a PlayerID when creating a new company, but the ClientID (index in _network_client_info). Therefore it was not possible to create a new company if 8 or more clients were connected. Thanks to FlashFF for noticing this bug.
1 file changed with 2 insertions and 3 deletions:
0 comments (0 inline, 0 general)
players.c
Show inline comments
 
@@ -820,9 +820,8 @@ int32 CmdPlayerCtrl(TileIndex tile, uint
 
		/* This command is only executed in a multiplayer game */
 
		if (!_networking) return CMD_ERROR;
 

	
 
		/* ClientID would be valid up to MAX_CLIENT_INFO, but as it has to be a
 
		 * new player, its valid range is restricted to that of players */
 
		if (!(flags & DC_EXEC) || !IsValidPlayer((PlayerID)cid)) return 0;
 
		/* Has the network client a correct ClientID? */
 
		if (!(flags & DC_EXEC) || cid >= MAX_CLIENT_INFO) return 0;
 

	
 
		/* Delete multiplayer progress bar */
 
		DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0);
0 comments (0 inline, 0 general)