- Timestamp:
- Aug 30, 2014, 6:11:18 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/AllocsLogFunctions.cs
r130 r144 1 using AllocsFixes.PersistentData; 1 2 using System; 2 3 using System.Collections.Generic; … … 13 14 int entityId = CommonMappingFunctions.GetEntityID (ci); 14 15 EntityPlayer ep = CommonMappingFunctions.GetEntityPlayer (ci); 16 string steamId = CommonMappingFunctions.GetSteamID (ci); 15 17 16 18 string ip = ci.networkPlayer.ipAddress; … … 23 25 ", entityid=" + entityId + 24 26 ", name=" + name + 25 ", steamid=" + CommonMappingFunctions.GetSteamID (ci)+27 ", steamid=" + steamId + 26 28 ", ip=" + ip 27 29 ); 30 31 PersistentContainer.Instance.Players[steamId].SetOnline(ci); 28 32 } catch (Exception e) { 29 Log.Out ("Error in RequestToSpawnPlayer: " + e); 33 Log.Out ("Error in AllocsLogFunctions.RequestToSpawnPlayer: " + e); 34 } 35 } 36 37 public static void PlayerDisconnected (GameManager manager, int _clientId) { 38 try { 39 ClientInfo ci = CommonMappingFunctions.GetClientInfoFromClientID (_clientId); 40 string steamId = CommonMappingFunctions.GetSteamID (ci); 41 Players players = PersistentContainer.Instance.Players; 42 if (players.SteamIDs.Contains(steamId)) 43 players[steamId].SetOffline(); 44 } catch (Exception e) { 45 Log.Out ("Error in AllocsLogFunctions.PlayerDisconnected: " + e); 30 46 } 31 47 }
Note:
See TracChangeset
for help on using the changeset viewer.