diff --git a/include/core/interfaces.hpp b/include/core/interfaces.hpp index 9daf27d0..330a73a9 100644 --- a/include/core/interfaces.hpp +++ b/include/core/interfaces.hpp @@ -67,7 +67,8 @@ extern IBaseClientDLL *g_IBaseClient; extern IEngineTrace *g_ITrace; extern IVModelInfoClient *g_IModelInfo; extern IInputSystem *g_IInputSystem; -extern CGlobalVarsBase *g_GlobalVars; +extern CGlobalVarsBase **rg_GlobalVars; +#define g_GlobalVars (*rg_GlobalVars) extern IPrediction *g_IPrediction; extern IGameMovement *g_IGameMovement; extern IInput *g_IInput; diff --git a/src/core/interfaces.cpp b/src/core/interfaces.cpp index 323aed18..e122ebcf 100644 --- a/src/core/interfaces.cpp +++ b/src/core/interfaces.cpp @@ -31,7 +31,7 @@ IBaseClientDLL *g_IBaseClient = nullptr; IEngineTrace *g_ITrace = nullptr; IVModelInfoClient *g_IModelInfo = nullptr; IInputSystem *g_IInputSystem = nullptr; -CGlobalVarsBase *g_GlobalVars = nullptr; +CGlobalVarsBase **rg_GlobalVars = nullptr; IPrediction *g_IPrediction = nullptr; IGameMovement *g_IGameMovement = nullptr; IInput *g_IInput = nullptr; @@ -127,8 +127,7 @@ void CreateInterfaces() // FIXME SIGNATURE g_ISteamFriends = g_ISteamClient->GetISteamFriends(su, sp, "SteamFriends002"); } - // g_GlobalVars = **(reinterpret_cast((uintptr_t) 11 + gSignatures.GetClientSignature("55 89 E5 83 EC ? 8B 45 08 8B 15 ? ? ? ? F3 0F 10"))); - g_GlobalVars = **reinterpret_cast(gSignatures.GetClientSignature("8B 15 ? ? ? ? F3 0F 10 88 D0 08 00 00") + 2); + rg_GlobalVars = *reinterpret_cast(gSignatures.GetClientSignature("8B 15 ? ? ? ? F3 0F 10 88 D0 08 00 00") + 2); g_IPrediction = BruteforceInterface("VClientPrediction", sharedobj::client()); g_IGameMovement = BruteforceInterface("GameMovement", sharedobj::client()); IF_GAME(IsTF2())