mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2024-11-27 14:08:39 +01:00
Fixes to matchmaking and friends.
This commit is contained in:
parent
e100c89160
commit
ba25559920
2 changed files with 10 additions and 9 deletions
|
@ -156,12 +156,9 @@ Steam_Friends(Settings* settings, Networking* network, SteamCallResults* callbac
|
||||||
|
|
||||||
static bool ok_friend_flags(int iFriendFlags)
|
static bool ok_friend_flags(int iFriendFlags)
|
||||||
{
|
{
|
||||||
if (iFriendFlags & k_EFriendFlagBlocked) return false;
|
if (iFriendFlags & k_EFriendFlagImmediate) return true;
|
||||||
if (iFriendFlags & k_EFriendFlagIgnored) return false;
|
|
||||||
if (iFriendFlags & k_EFriendFlagIgnoredFriend) return false;
|
return false;
|
||||||
if (iFriendFlags & k_EFriendFlagFriendshipRequested) return false;
|
|
||||||
if (iFriendFlags & k_EFriendFlagRequestingFriendship) return false;
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// returns the local players name - guaranteed to not be NULL.
|
// 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
|
// then GetFriendByIndex() can then be used to return the id's of each of those users
|
||||||
int GetFriendCount( int iFriendFlags )
|
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);
|
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
||||||
int count = 0;
|
int count = 0;
|
||||||
if (ok_friend_flags(iFriendFlags)) count = friends.size();
|
if (ok_friend_flags(iFriendFlags)) count = friends.size();
|
||||||
|
PRINT_DEBUG("count %i\n", count);
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1187,7 +1187,11 @@ void RunCallbacks()
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
PRINT_DEBUG("%s\n", value->second.c_str());
|
PRINT_DEBUG("%s\n", value->second.c_str());
|
||||||
int compare_to = std::stoll(value->second, 0, 0);
|
int compare_to = 0;
|
||||||
|
//TODO: check if this is how real steam behaves
|
||||||
|
if (value->second.size()) {
|
||||||
|
compare_to = std::stoll(value->second, 0, 0);
|
||||||
|
}
|
||||||
PRINT_DEBUG("Compare Values %i %i\n", compare_to, f.value_int);
|
PRINT_DEBUG("Compare Values %i %i\n", compare_to, f.value_int);
|
||||||
if (f.eComparisonType == k_ELobbyComparisonEqual) {
|
if (f.eComparisonType == k_ELobbyComparisonEqual) {
|
||||||
if (compare_to == f.value_int) {
|
if (compare_to == f.value_int) {
|
||||||
|
|
Loading…
Reference in a new issue