- Timestamp:
- Aug 26, 2014, 4:41:47 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/AllocsLogFunctions.cs
r107 r130 3 3 using UnityEngine; 4 4 5 public class AllocsLogFunctions5 namespace AllocsFixes 6 6 { 7 public static void RequestToSpawnPlayer (GameManager manager, int _clientId, string _name, string _playerClassname, string _skinTexture, int _chunkViewDim)7 public class AllocsLogFunctions 8 8 { 9 try { 10 ClientInfo ci = CommonMappingFunctions.GetClientInfoFromClientID (_clientId); 11 int entityId = CommonMappingFunctions.GetEntityID (ci); 12 EntityPlayer ep = CommonMappingFunctions.GetEntityPlayer (ci); 9 public static void RequestToSpawnPlayer (GameManager manager, int _clientId, string _name, string _playerClassname, string _skinTexture, int _chunkViewDim) 10 { 11 try { 12 ClientInfo ci = CommonMappingFunctions.GetClientInfoFromClientID (_clientId); 13 int entityId = CommonMappingFunctions.GetEntityID (ci); 14 EntityPlayer ep = CommonMappingFunctions.GetEntityPlayer (ci); 13 15 14 string ip = ci.networkPlayer.ipAddress;15 string name = string.Empty;16 string ip = ci.networkPlayer.ipAddress; 17 string name = string.Empty; 16 18 17 if (ep != null)18 name = ep.EntityName;19 if (ep != null) 20 name = ep.EntityName; 19 21 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); 22 Log.Out ("Player connected, clientid=" + _clientId + 23 ", entityid=" + entityId + 24 ", name=" + name + 25 ", steamid=" + CommonMappingFunctions.GetSteamID (ci) + 26 ", ip=" + ip 27 ); 28 } catch (Exception e) { 29 Log.Out ("Error in RequestToSpawnPlayer: " + e); 30 } 28 31 } 29 32 }
Note:
See TracChangeset
for help on using the changeset viewer.