- Timestamp:
- Nov 9, 2021, 6:28:33 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/Web/API/GetPlayersLocation.cs
r351 r369 9 9 int _permissionLevel) { 10 10 AdminTools admTools = GameManager.Instance.adminTools; 11 _user = _user ?? new WebConnection ("", IPAddress.None, 0L);11 PlatformUserIdentifierAbs userId = _user?.UserId; 12 12 13 13 bool listOffline = false; … … 22 22 Players playersList = PersistentContainer.Instance.Players; 23 23 24 foreach (KeyValuePair< string, Player> kvp in playersList.Dict) {24 foreach (KeyValuePair<PlatformUserIdentifierAbs, Player> kvp in playersList.Dict) { 25 25 if (admTools != null) { 26 if (admTools.IsBanned (kvp.Key )) {26 if (admTools.IsBanned (kvp.Key, out _, out _)) { 27 27 continue; 28 28 } … … 32 32 33 33 if (listOffline || p.IsOnline) { 34 ulong player_steam_ID; 35 if (!ulong.TryParse (kvp.Key, out player_steam_ID)) { 36 player_steam_ID = 0L; 37 } 38 39 if (player_steam_ID == _user.SteamID || bViewAll) { 34 if (bViewAll || p.PlatformId.Equals (userId)) { 40 35 JSONObject pos = new JSONObject (); 41 36 pos.Add ("x", new JSONNumber (p.LastPosition.x)); … … 44 39 45 40 JSONObject pJson = new JSONObject (); 46 pJson.Add ("steamid", new JSONString (kvp.Key ));41 pJson.Add ("steamid", new JSONString (kvp.Key.CombinedString)); 47 42 48 43 // pJson.Add("entityid", new JSONNumber (p.EntityID));
Note:
See TracChangeset
for help on using the changeset viewer.