mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Add gpGlobals to SDK
This commit is contained in:
parent
b477bbbeaa
commit
94bf515ba7
@ -95,3 +95,6 @@ void CServerGameDLL_Detach()
|
||||
CServerGameDLL* g_pServerGameDLL = nullptr;
|
||||
CServerGameClients* g_pServerGameClients = nullptr;
|
||||
CServerGameEnts* g_pServerGameEntities = nullptr;
|
||||
|
||||
// Holds global variables shared between engine and game.
|
||||
CGlobalVars* g_pGlobals = nullptr;
|
||||
|
@ -48,6 +48,8 @@ extern CServerGameDLL* g_pServerGameDLL;
|
||||
extern CServerGameClients* g_pServerGameClients;
|
||||
extern CServerGameEnts* g_pServerGameEntities;
|
||||
|
||||
extern CGlobalVars* g_pGlobals;
|
||||
|
||||
void CServerGameDLL_Attach();
|
||||
void CServerGameDLL_Detach();
|
||||
|
||||
@ -60,6 +62,7 @@ class VServerGameDLL : public IDetour
|
||||
spdlog::debug("| VAR: g_pServerGameDLL : {:#18x} |\n", reinterpret_cast<uintptr_t>(g_pServerGameDLL));
|
||||
spdlog::debug("| VAR: g_pServerGameClients : {:#18x} |\n", reinterpret_cast<uintptr_t>(g_pServerGameClients));
|
||||
spdlog::debug("| VAR: g_pServerGameEntities : {:#18x} |\n", reinterpret_cast<uintptr_t>(g_pServerGameEntities));
|
||||
spdlog::debug("| VAR: g_pGlobals : {:#18x} |\n", reinterpret_cast<uintptr_t>(g_pGlobals));
|
||||
spdlog::debug("+----------------------------------------------------------------+\n");
|
||||
}
|
||||
virtual void GetFun(void) const
|
||||
@ -69,7 +72,10 @@ class VServerGameDLL : public IDetour
|
||||
CServerGameDLL__OnReceivedSayTextMessage = p_CServerGameDLL__OnReceivedSayTextMessage.RCast<void(__fastcall*)(void* thisptr, int senderId, const char* text, bool isTeamChat)>();
|
||||
#endif
|
||||
}
|
||||
virtual void GetVar(void) const { }
|
||||
virtual void GetVar(void) const
|
||||
{
|
||||
g_pGlobals = g_GameDll.FindPatternSIMD("4C 8B 0D ? ? ? ? 48 8B D1").ResolveRelativeAddressSelf(0x3, 0x7).RCast<CGlobalVars*>();
|
||||
}
|
||||
virtual void GetCon(void) const { }
|
||||
virtual void Attach(void) const { }
|
||||
virtual void Detach(void) const { }
|
||||
|
@ -7,7 +7,7 @@
|
||||
#define SIGDB_DICT_SIZE 20
|
||||
|
||||
#define SIGDB_MAJOR_VERSION 0x1 // Increment when library changes are made.
|
||||
#define SIGDB_MINOR_VERSION 0x4 // Increment when SDK updates are released.
|
||||
#define SIGDB_MINOR_VERSION 0x5 // Increment when SDK updates are released.
|
||||
|
||||
#ifdef DEDICATED
|
||||
#define SIGDB_FILE "cfg\\server\\startup.bin"
|
||||
|
Loading…
x
Reference in New Issue
Block a user