[Friends] Don't send friend info with nosteam flag

This commit is contained in:
momo5502 2017-02-18 11:45:13 +01:00
parent ccb7c48587
commit 7697ab1764

View File

@ -122,7 +122,7 @@ namespace Components
void Friends::UpdateState(bool force)
{
if (Dvar::Var("cl_anonymous").get<bool>()) return;
if (Dvar::Var("cl_anonymous").get<bool>() || Components::Flags::HasFlag("nosteam")) return;
if(force)
{
@ -169,7 +169,7 @@ namespace Components
void Friends::SetPresence(std::string key, std::string value)
{
if (Steam::Proxy::ClientFriends && !Dvar::Var("cl_anonymous").get<bool>())
if (Steam::Proxy::ClientFriends && !Dvar::Var("cl_anonymous").get<bool>() && !Components::Flags::HasFlag("nosteam"))
{
Steam::Proxy::ClientFriends.invoke<void>("SetRichPresence", 0, key.data(), value.data());
Steam::Proxy::ClientFriends.invoke<void>("SetRichPresence", Steam::Proxy::AppId, key.data(), value.data());
@ -584,7 +584,7 @@ namespace Components
Friends::InitialState = Steam::Proxy::SteamFriends->GetPersonaState();
}
if(Dvar::Var("cl_anonymous").get<bool>())
if(Dvar::Var("cl_anonymous").get<bool>() || Components::Flags::HasFlag("nosteam"))
{
if (Steam::Proxy::ClientFriends)
{