source: binary-improvements/7dtd-server-fixes/src/AllocsRequestToSpawnPlayer.cs@ 78

Last change on this file since 78 was 76, checked in by alloc, 10 years ago

fixer

File size: 867 bytes
Line 
1using System;
2using System.Collections.Generic;
3
4public class AllocsRequestToSpawnPlayer
5{
6 public static void RequestToSpawnPlayer (GameManager manager, int _clientId, string _name, string _playerClassname, string _skinTexture, int _chunkViewDim)
7 {
8 string ip = manager.connectionManager.connectedClients [_clientId].networkPlayer.ipAddress;
9 string name = string.Empty;
10 int entityId = -1;
11 Dictionary<int,int> d = manager.connectionManager.mapClientToEntity;
12 if (d.ContainsKey (_clientId)) {
13 entityId = d [_clientId];
14 World w = manager.World;
15 name = w.playerEntities.dict [entityId].EntityName;
16 }
17
18 Log.Out ("Player connected, clientid=" + _clientId +
19 ", entityid=" + entityId +
20 ", name=" + name +
21 ", steamid=" + SingletonMonoBehaviour<Authenticator>.Instance.GetPlayerId (name) +
22 ", ip=" + ip);
23 }
24}
Note: See TracBrowser for help on using the repository browser.