|
|
|
@ -156,12 +156,9 @@ Steam_Friends(Settings* settings, Networking* network, SteamCallResults* callbac
|
|
|
|
|
|
|
|
|
|
static bool ok_friend_flags(int iFriendFlags)
|
|
|
|
|
{
|
|
|
|
|
if (iFriendFlags & k_EFriendFlagBlocked) return false;
|
|
|
|
|
if (iFriendFlags & k_EFriendFlagIgnored) return false;
|
|
|
|
|
if (iFriendFlags & k_EFriendFlagIgnoredFriend) return false;
|
|
|
|
|
if (iFriendFlags & k_EFriendFlagFriendshipRequested) return false;
|
|
|
|
|
if (iFriendFlags & k_EFriendFlagRequestingFriendship) return false;
|
|
|
|
|
return true;
|
|
|
|
|
if (iFriendFlags & k_EFriendFlagImmediate) return true;
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// returns the local players name - guaranteed to not be NULL.
|
|
|
|
@ -218,11 +215,11 @@ EPersonaState GetPersonaState()
|
|
|
|
|
// then GetFriendByIndex() can then be used to return the id's of each of those users
|
|
|
|
|
int GetFriendCount( int iFriendFlags )
|
|
|
|
|
{
|
|
|
|
|
PRINT_DEBUG("Steam_Friends::GetFriendCount\n");
|
|
|
|
|
PRINT_DEBUG("Steam_Friends::GetFriendCount %i\n", iFriendFlags);
|
|
|
|
|
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
|
|
|
|
int count = 0;
|
|
|
|
|
if (ok_friend_flags(iFriendFlags)) count = friends.size();
|
|
|
|
|
|
|
|
|
|
PRINT_DEBUG("count %i\n", count);
|
|
|
|
|
return count;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|