Merge pull request #417 from diamante0018/fix/persona-state
[Friends] Remove code that forces you to be busy on Steam
This commit is contained in:
commit
c6690d1d8f
@ -126,23 +126,15 @@ namespace Components
|
||||
}
|
||||
}
|
||||
|
||||
void Friends::UpdateState(bool force)
|
||||
void Friends::UpdateState()
|
||||
{
|
||||
if (Friends::CLAnonymous.get<bool>() || Friends::IsInvisible() || !Steam::Enabled()) return;
|
||||
if (Friends::CLAnonymous.get<bool>() || Friends::IsInvisible() || !Steam::Enabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (force)
|
||||
{
|
||||
if (Steam::Proxy::ClientFriends && Steam::Proxy::SteamFriends)
|
||||
{
|
||||
int state = Steam::Proxy::SteamFriends->GetPersonaState();
|
||||
Steam::Proxy::ClientFriends.invoke<void>("SetPersonaState", (state == 1 ? 2 : 1));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Friends::TriggerUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
void Friends::UpdateServer(Network::Address server, const std::string& hostname, const std::string& mapname)
|
||||
{
|
||||
@ -660,7 +652,7 @@ namespace Components
|
||||
if (Friends::TriggerUpdate)
|
||||
{
|
||||
Friends::TriggerUpdate = false;
|
||||
Friends::UpdateState(true);
|
||||
Friends::UpdateState();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ namespace Components
|
||||
static bool IsClientInParty(int controller, int clientNum);
|
||||
|
||||
static void UpdateUserInfo(SteamID user);
|
||||
static void UpdateState(bool force = false);
|
||||
static void UpdateState();
|
||||
|
||||
static void SortList(bool force = false);
|
||||
static void SortIndividualList(std::vector<Friend>* list);
|
||||
|
@ -28,7 +28,7 @@ namespace Steam
|
||||
|
||||
SteamID Friends::GetFriendByIndex(int iFriend, int iFriendFlags)
|
||||
{
|
||||
return SteamID();
|
||||
return {};
|
||||
}
|
||||
|
||||
int Friends::GetFriendRelationship(SteamID steamIDFriend)
|
||||
@ -88,7 +88,7 @@ namespace Steam
|
||||
|
||||
SteamID Friends::GetFriendFromSourceByIndex(SteamID steamIDSource, int iFriend)
|
||||
{
|
||||
return SteamID();
|
||||
return {};
|
||||
}
|
||||
|
||||
bool Friends::IsUserInSource(SteamID steamIDUser, SteamID steamIDSource)
|
||||
|
Loading…
Reference in New Issue
Block a user