Ignore:
Timestamp:
Sep 3, 2014, 12:04:42 PM (10 years ago)
Author:
alloc
Message:

fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements/7dtd-server-fixes/src/AllocsLogFunctions.cs

    r146 r156  
    3838                public static void PlayerDisconnected (GameManager manager, int _clientId) {
    3939                        try {
    40                                 ClientInfo ci = CommonMappingFunctions.GetClientInfoFromClientID (_clientId);
    41                                 string steamId = CommonMappingFunctions.GetSteamID (ci);
    42                                 Players players = PersistentContainer.Instance.Players;
    43                                 if (players.SteamIDs.Contains(steamId))
    44                                         players[steamId].SetOffline();
     40                                Player p = PersistentContainer.Instance.Players.GetPlayerByClientId(_clientId);
     41                                if (p != null) {
     42                                        p.SetOffline();
     43                                }
    4544                                PersistentData.PersistentContainer.Instance.Save ();
    4645                        } catch (Exception e) {
Note: See TracChangeset for help on using the changeset viewer.