Basic IsUserInSource implementation for the main lobby.
parent
51a5e3bc27
commit
1f79ca9231
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -623,7 +623,7 @@ SteamAPICall_t JoinLobby( CSteamID steamIDLobby )
|
||||||
data.m_EChatRoomEnterResponse = k_EChatRoomEnterResponseSuccess;
|
data.m_EChatRoomEnterResponse = k_EChatRoomEnterResponseSuccess;
|
||||||
auto api = callback_results->addCallResult(data.k_iCallback, &data, sizeof(data));
|
auto api = callback_results->addCallResult(data.k_iCallback, &data, sizeof(data));
|
||||||
callbacks->addCBResult(data.k_iCallback, &data, sizeof(data));
|
callbacks->addCBResult(data.k_iCallback, &data, sizeof(data));
|
||||||
|
|
||||||
return api;
|
return api;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue