diff --git a/src/Components/Modules/Friends.cpp b/src/Components/Modules/Friends.cpp index 20f6255d..d7c5e882 100644 --- a/src/Components/Modules/Friends.cpp +++ b/src/Components/Modules/Friends.cpp @@ -126,10 +126,10 @@ namespace Components if(force) { - if (Steam::Proxy::SteamLegacyFriends) + if (Steam::Proxy::ClientFriends && Steam::Proxy::SteamFriends) { - int state = Steam::Proxy::SteamLegacyFriends->GetPersonaState(); - Steam::Proxy::SteamLegacyFriends->SetPersonaState((state == 1 ? 2 : 1)); + int state = Steam::Proxy::SteamFriends->GetPersonaState(); + Steam::Proxy::ClientFriends.invoke("SetPersonaState", (state == 1 ? 2 : 1)); } } else @@ -571,17 +571,17 @@ namespace Components } #endif - if(Steam::Proxy::SteamLegacyFriends) + if(Steam::Proxy::ClientFriends) { - Steam::Proxy::SteamLegacyFriends->SetPersonaState(Friends::InitialState); + Steam::Proxy::ClientFriends.invoke("SetPersonaState", Friends::InitialState); } }); QuickPatch::Once([]() { - if (Steam::Proxy::SteamLegacyFriends) + if (Steam::Proxy::SteamFriends) { - Friends::InitialState = Steam::Proxy::SteamLegacyFriends->GetPersonaState(); + Friends::InitialState = Steam::Proxy::SteamFriends->GetPersonaState(); } if(Dvar::Var("cl_anonymous").get()) diff --git a/src/Steam/Interfaces/SteamFriends.hpp b/src/Steam/Interfaces/SteamFriends.hpp index 732e97e6..a0881021 100644 --- a/src/Steam/Interfaces/SteamFriends.hpp +++ b/src/Steam/Interfaces/SteamFriends.hpp @@ -111,14 +111,4 @@ namespace Steam virtual uint64_t IsFollowing(SteamID steamID) = 0; virtual uint64_t EnumerateFollowingList(uint32_t unStartIndex) = 0; }; - - class Friends2 - { - public: - virtual const char *GetPersonaName() = 0; - virtual void SetPersonaName(const char *pchPersonaName) = 0; - virtual int GetPersonaState() = 0; - virtual void SetPersonaState(int ePersonaState) = 0; - // [...] - }; } diff --git a/src/Steam/Proxy.cpp b/src/Steam/Proxy.cpp index 1fc7ebff..c44cc1c0 100644 --- a/src/Steam/Proxy.cpp +++ b/src/Steam/Proxy.cpp @@ -14,7 +14,6 @@ namespace Steam void* Proxy::SteamUser = nullptr; Friends15* Proxy::SteamFriends = nullptr; - Friends2* Proxy::SteamLegacyFriends = nullptr; Utils* Proxy::SteamUtils = nullptr; User* Proxy::SteamUser_ = nullptr; @@ -320,9 +319,6 @@ namespace Steam Proxy::SteamFriends = reinterpret_cast(Proxy::SteamClient->GetISteamFriends(Proxy::SteamUser, Proxy::SteamPipe, "SteamFriends015")); if (!Proxy::SteamFriends) return false; - Proxy::SteamLegacyFriends = reinterpret_cast(Proxy::SteamClient->GetISteamFriends(Proxy::SteamUser, Proxy::SteamPipe, "SteamFriends002")); - if (!Proxy::SteamLegacyFriends) return false; - Proxy::SteamUtils = reinterpret_cast(Proxy::SteamClient->GetISteamUtils(Proxy::SteamPipe, "SteamUtils005")); if (!Proxy::SteamUtils) return false; diff --git a/src/Steam/Proxy.hpp b/src/Steam/Proxy.hpp index 2d1be6d8..7f95dac8 100644 --- a/src/Steam/Proxy.hpp +++ b/src/Steam/Proxy.hpp @@ -204,7 +204,6 @@ namespace Steam static void UnregisterCallback(int32_t callId); static Friends15* SteamFriends; - static Friends2* SteamLegacyFriends; static Utils* SteamUtils; static User* SteamUser_; static Interface ClientFriends;