Changeset 371 for binary-improvements


Ignore:
Timestamp:
Jul 27, 2022, 7:16:34 PM (2 years ago)
Author:
alloc
Message:

Fixed stuff using InternalId for every storage/lookup instead of a mix of both Native+Internal

Location:
binary-improvements
Files:
3 edited

Legend:

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

    r369 r371  
    2323
    2424                public void SavePlayerData (ClientInfo _cInfo, PlayerDataFile _playerDataFile) {
    25                         PersistentContainer.Instance.Players [_cInfo.PlatformId, true].Update (_playerDataFile);
     25                        PersistentContainer.Instance.Players [_cInfo.InternalId, true].Update (_playerDataFile);
    2626                }
    2727
     
    4343
    4444                public void PlayerDisconnected (ClientInfo _cInfo, bool _bShutdown) {
    45                         Player p = PersistentContainer.Instance.Players [_cInfo.PlatformId, false];
     45                        Player p = PersistentContainer.Instance.Players [_cInfo.InternalId, false];
    4646                        if (p != null) {
    4747                                p.SetOffline ();
     
    5454
    5555                public void PlayerSpawned (ClientInfo _cInfo, RespawnType _respawnReason, Vector3i _spawnPos) {
    56                         PersistentContainer.Instance.Players [_cInfo.PlatformId, true].SetOnline (_cInfo);
     56                        PersistentContainer.Instance.Players [_cInfo.InternalId, true].SetOnline (_cInfo);
    5757                        PersistentContainer.Instance.Save ();
    5858                }
  • binary-improvements/AllocsCommands/Commands/ListLandProtection.cs

    r369 r371  
    5555                                        ClientInfo ci = ConsoleHelper.ParseParamIdOrName (_params [0]);
    5656                                        if (ci != null) {
    57                                                 userIdFilter = ci.PlatformId;
     57                                                userIdFilter = ci.InternalId;
    5858                                        } else {
    5959                                                SdtdConsole.Instance.Output ("Player name or entity id \"" + _params [0] + "\" not found.");
  • binary-improvements/MapRendering/Web/API/GetPlayersOnline.cs

    r369 r371  
    1313                        foreach (KeyValuePair<int, EntityPlayer> current in w.Players.dict) {
    1414                                ClientInfo ci = ConnectionManager.Instance.Clients.ForEntityId (current.Key);
    15                                 Player player = PersistentContainer.Instance.Players [ci.PlatformId, false];
     15                                Player player = PersistentContainer.Instance.Players [ci.InternalId, false];
    1616
    1717                                JSONObject pos = new JSONObject ();
Note: See TracChangeset for help on using the changeset viewer.