Changeset - r5068:cf288b3780ea
[Not reviewed]
master
0 1 0
Darkvater - 18 years ago 2006-11-10 18:34:19
darkvater@openttd.org
(svn r7126) -Synchronize the engine-renew settings of a player when joining a multiplayer game.
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
players.c
Show inline comments
 
@@ -851,24 +851,26 @@ int32 CmdPlayerCtrl(TileIndex tile, uint
 
			} else
 
#endif /* ENABLE_NETWORK */
 
			{
 
				_local_player = _network_playas = PLAYER_SPECTATOR;
 
			}
 
			break;
 
		}
 

	
 
		/* This is the joining client who wants a new company */
 
		if (_local_player != _network_playas) {
 
			assert(_local_player == PLAYER_SPECTATOR && _network_playas == p->index);
 
			_local_player = p->index;
 
			DoCommandP(0, (_patches.autorenew << 15 ) | (_patches.autorenew_months << 16) | 4, _patches.autorenew_money, NULL, CMD_SET_AUTOREPLACE);
 

	
 
			MarkWholeScreenDirty();
 
		}
 

	
 
#ifdef ENABLE_NETWORK
 
		if (_network_server) {
 
			/* XXX - UGLY! p2 (pid) is mis-used to fetch the client-id, done at
 
			 * server-side in network_server.c:838, function
 
			 * DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_COMMAND) */
 
			NetworkClientInfo *ci = &_network_client_info[cid];
 
			ci->client_playas = p->index;
 
			NetworkUpdateClientInfo(ci->client_index);
 

	
0 comments (0 inline, 0 general)