diff --git a/Facepunch.Steamworks/Client/Leaderboard.cs b/Facepunch.Steamworks/Client/Leaderboard.cs index 5b6c731..ff5b5e0 100644 --- a/Facepunch.Steamworks/Client/Leaderboard.cs +++ b/Facepunch.Steamworks/Client/Leaderboard.cs @@ -132,7 +132,8 @@ internal void OnBoardCreated( LeaderboardFindResult_t result, bool error ) /// Subscores are totally optional, and can be used for other game defined data such as laps etc.. although /// they have no bearing on sorting at all /// If onlyIfBeatsOldScore is true, the score will only be updated if it beats the existing score, else it will always - /// be updated. + /// be updated. Beating the existing score is subjective - and depends on how your leaderboard was set up as to whether + /// that means higher or lower. /// public bool AddScore( bool onlyIfBeatsOldScore, int score, params int[] subscores ) { diff --git a/Facepunch.Steamworks/Client/Lobby.cs b/Facepunch.Steamworks/Client/Lobby.cs index 2dfa2ca..f0a4dcb 100644 --- a/Facepunch.Steamworks/Client/Lobby.cs +++ b/Facepunch.Steamworks/Client/Lobby.cs @@ -490,7 +490,11 @@ public int NumMembers /// public void Leave() { - if (CurrentLobby != 0) { client.native.matchmaking.LeaveLobby(CurrentLobby); } + if (CurrentLobby != 0) + { + client.native.matchmaking.LeaveLobby(CurrentLobby); + } + CurrentLobby = 0; CurrentLobbyData = null; } @@ -508,7 +512,6 @@ public void Dispose() /// Array of member SteamIDs public ulong[] GetMemberIDs() { - ulong[] memIDs = new ulong[NumMembers]; for (int i = 0; i < NumMembers; i++) { @@ -524,14 +527,15 @@ public ulong[] GetMemberIDs() /// public bool UserIsInCurrentLobby(ulong steamID) { - if(CurrentLobby == 0) { return false; } + if ( CurrentLobby == 0 ) + return false; + ulong[] mems = GetMemberIDs(); + for (int i = 0; i < mems.Length; i++) { - if(mems[i] == steamID) - { + if ( mems[i] == steamID ) return true; - } } return false;