source: binary-improvements/7dtd-server-fixes/src/AllocsLogFunctions.cs@ 111

Last change on this file since 111 was 107, checked in by alloc, 10 years ago

fixes

File size: 878 bytes
Line 
1using System;
2using System.Collections.Generic;
3using UnityEngine;
4
5public class AllocsLogFunctions
6{
7 public static void RequestToSpawnPlayer (GameManager manager, int _clientId, string _name, string _playerClassname, string _skinTexture, int _chunkViewDim)
8 {
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);
28 }
29 }
30}
Note: See TracBrowser for help on using the repository browser.