1
0
Fork 0
mirror of https://gitlab.com/Mr_Goldberg/goldberg_emulator.git synced 2024-11-14 10:50:13 +01:00

Basic IsUserInSource implementation for the main lobby.

This commit is contained in:
Mr_Goldberg 2019-05-30 07:58:03 -04:00
parent 51a5e3bc27
commit 1f79ca9231
No known key found for this signature in database
GPG key ID: 8597D87419DEF278
2 changed files with 10 additions and 1 deletions

View file

@ -462,6 +462,15 @@ CSteamID GetFriendFromSourceByIndex( CSteamID steamIDSource, int iFriend )
bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource ) bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource )
{ {
PRINT_DEBUG("Steam_Friends::IsUserInSource %llu %llu\n", steamIDUser.ConvertToUint64(), steamIDSource.ConvertToUint64()); PRINT_DEBUG("Steam_Friends::IsUserInSource %llu %llu\n", steamIDUser.ConvertToUint64(), steamIDSource.ConvertToUint64());
if (steamIDUser == settings->get_local_steam_id()) {
if (settings->get_lobby() == steamIDSource) {
return true;
}
} else {
Friend *f = find_friend(steamIDUser);
if (!f) return false;
if (f->lobby_id() == steamIDSource.ConvertToUint64()) return true;
}
//TODO //TODO
return false; return false;
} }