- Timestamp:
- Apr 18, 2015, 4:27:57 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/AllocsLogFunctions.cs
r228 r230 8 8 public class AllocsLogFunctions 9 9 { 10 public static void RequestToSpawnPlayer ( GameManager manager,int _clientId, string _name, int _chunkViewDim, PlayerProfile _playerProfile)10 public static void RequestToSpawnPlayer (int _clientId, string _name, int _chunkViewDim, PlayerProfile _playerProfile) 11 11 { 12 12 try { 13 ClientInfo ci = CommonMappingFunctions.GetClientInfoFromClientID (_clientId); 14 int entityId = CommonMappingFunctions.GetEntityID (ci); 15 EntityPlayer ep = CommonMappingFunctions.GetEntityPlayer (ci); 16 string steamId = CommonMappingFunctions.GetSteamID (ci); 17 18 string ip = ci.ip; 19 string name = string.Empty; 20 21 if (ep != null) 22 name = ep.EntityName; 13 ClientInfo ci = ConnectionManager.Instance.GetClient (_clientId); 23 14 24 15 Log.Out ("Player connected, clientid=" + _clientId + 25 ", entityid=" + entityId +26 ", name=" + name +27 ", steamid=" + steamId +28 ", ip=" + ip16 ", entityid=" + ci.entityId + 17 ", name=" + ci.playerName + 18 ", steamid=" + ci.playerId + 19 ", ip=" + ci.ip 29 20 ); 30 21 31 PersistentContainer.Instance.Players [ steamId].SetOnline (ci);22 PersistentContainer.Instance.Players [ci.playerId].SetOnline (ci); 32 23 PersistentData.PersistentContainer.Instance.Save (); 33 34 Mods.CallRequestToSpawnPlayer (_clientId, _name, _chunkViewDim, _playerProfile);35 24 } catch (Exception e) { 36 25 Log.Out ("Error in AllocsLogFunctions.RequestToSpawnPlayer: " + e); … … 38 27 } 39 28 40 public static void PlayerDisconnected (C onnectionManager manager, ClientInfo _cInfo, bool _bShutdown)29 public static void PlayerDisconnected (ClientInfo _cInfo, bool _bShutdown) 41 30 { 42 31 try { … … 48 37 } 49 38 PersistentData.PersistentContainer.Instance.Save (); 50 51 Mods.CallPlayerDisconnected (_cInfo, _bShutdown);52 39 } catch (Exception e) { 53 40 Log.Out ("Error in AllocsLogFunctions.PlayerDisconnected: " + e);
Note:
See TracChangeset
for help on using the changeset viewer.