- Timestamp:
- Jul 24, 2014, 3:25:58 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/AllocsLogFunctions.cs
r83 r103 7 7 public static void RequestToSpawnPlayer (GameManager manager, int _clientId, string _name, string _playerClassname, string _skinTexture, int _chunkViewDim) 8 8 { 9 string ip = manager.connectionManager.connectedClients [_clientId].networkPlayer.ipAddress; 10 string name = string.Empty; 11 int entityId = -1; 12 Dictionary<int,int> d = manager.connectionManager.mapClientToEntity; 13 if (d.ContainsKey (_clientId)) { 14 entityId = d [_clientId]; 15 World w = manager.World; 16 name = w.playerEntities.dict [entityId].EntityName; 9 try { 10 ClientInfo ci = CommonMappingFunctions.GetClientInfoFromClientID (_clientId); 11 int entityId = CommonMappingFunctions.GetEntityID (ci); 12 EntityPlayer ep = CommonMappingFunctions.GetEntityPlayer (ci); 13 14 string ip = ci.networkPlayer.ipAddress; 15 string name = string.Empty; 16 17 if (ep != null) 18 name = ep.EntityName; 19 20 Log.Out ("Player connected, clientid=" + _clientId + 21 ", entityid=" + entityId + 22 ", name=" + name + 23 ", steamid=" + CommonMappingFunctions.GetSteamID (ci) + 24 ", ip=" + ip 25 ); 26 } catch (Exception e) { 27 Log.Out ("Error in RequestToSpawnPlayer: " + e); 17 28 } 18 19 Log.Out ("Player connected, clientid=" + _clientId +20 ", entityid=" + entityId +21 ", name=" + name +22 ", steamid=" + SingletonMonoBehaviour<Authenticator>.Instance.GetPlayerId (name) +23 ", ip=" + ip24 );25 29 } 26 30
Note:
See TracChangeset
for help on using the changeset viewer.