Ignore:
Timestamp:
Jun 12, 2023, 3:21:34 PM (17 months ago)
Author:
alloc
Message:

24_27_41

File:
1 edited

Legend:

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

    r443 r446  
    2323
    2424                public void SavePlayerData (ClientInfo _cInfo, PlayerDataFile _playerDataFile) {
    25                         PersistentContainer.Instance.Players [_cInfo.InternalId, true].Update (_cInfo, _playerDataFile);
     25                        PersistentContainer.Instance.Players.GetOrCreate (_cInfo.InternalId, _cInfo.PlatformId, _cInfo.CrossplatformId).Update (_cInfo, _playerDataFile);
    2626                }
    2727
     
    4343
    4444                public void PlayerDisconnected (ClientInfo _cInfo, bool _bShutdown) {
    45                         Player p = PersistentContainer.Instance.Players [_cInfo.InternalId, false];
     45                        Player p = PersistentContainer.Instance.Players.GetByInternalId (_cInfo.InternalId);
    4646                        if (p != null) {
    4747                                p.SetOffline ();
     
    5454
    5555                public void PlayerSpawned (ClientInfo _cInfo, RespawnType _respawnReason, Vector3i _spawnPos) {
    56                         PersistentContainer.Instance.Players [_cInfo.InternalId, true].SetOnline (_cInfo);
     56                        PersistentContainer.Instance.Players.GetOrCreate (_cInfo.InternalId, _cInfo.PlatformId, _cInfo.CrossplatformId).SetOnline (_cInfo);
    5757                        PersistentContainer.Instance.Save ();
    5858                }
Note: See TracChangeset for help on using the changeset viewer.