aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/gameutils.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-05-12 15:25:08 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-05-12 15:25:08 +0100
commita526ad915694ce9881b7ff093cdab9587d088217 (patch)
tree4deacbfeedd0a8d937ab4747c2e2629e994ce7ec /NorthstarDedicatedTest/gameutils.cpp
parent6768e46b200c63d758bd6e92bd500f3c754c3245 (diff)
downloadNorthstarLauncher-a526ad915694ce9881b7ff093cdab9587d088217.tar.gz
NorthstarLauncher-a526ad915694ce9881b7ff093cdab9587d088217.zip
separate gameutils into multiple r2 headers
Diffstat (limited to 'NorthstarDedicatedTest/gameutils.cpp')
-rw-r--r--NorthstarDedicatedTest/gameutils.cpp59
1 files changed, 0 insertions, 59 deletions
diff --git a/NorthstarDedicatedTest/gameutils.cpp b/NorthstarDedicatedTest/gameutils.cpp
deleted file mode 100644
index ce96a5e5..00000000
--- a/NorthstarDedicatedTest/gameutils.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-#include "pch.h"
-#include "convar.h"
-#include "gameutils.h"
-#include "hoststate.h"
-
-// cmd.h
-Cbuf_GetCurrentPlayerType Cbuf_GetCurrentPlayer;
-Cbuf_AddTextType Cbuf_AddText;
-Cbuf_ExecuteType Cbuf_Execute;
-
-// cengine stuff
-CEngine* g_pEngine;
-server_state_t* sv_m_State;
-
-// server entity stuff
-Server_GetEntityByIndexType Server_GetEntityByIndex;
-
-// auth
-char* g_LocalPlayerUserID;
-char* g_LocalPlayerOriginToken;
-
-// misc stuff
-GetBaseLocalClientType GetBaseLocalClient;
-
-void InitialiseEngineGameUtilFunctions(HMODULE baseAddress)
-{
- Cbuf_GetCurrentPlayer = (Cbuf_GetCurrentPlayerType)((char*)baseAddress + 0x120630);
- Cbuf_AddText = (Cbuf_AddTextType)((char*)baseAddress + 0x1203B0);
- Cbuf_Execute = (Cbuf_ExecuteType)((char*)baseAddress + 0x1204B0);
-
- R2::g_pHostState = (R2::CHostState*)((char*)baseAddress + 0x7CF180);
- g_pEngine = *(CEngine**)((char*)baseAddress + 0x7D70C8);
- sv_m_State = (server_state_t*)((char*)baseAddress + 0x12A53D48);
-
- g_LocalPlayerUserID = (char*)baseAddress + 0x13F8E688;
- g_LocalPlayerOriginToken = (char*)baseAddress + 0x13979C80;
-
- GetBaseLocalClient = (GetBaseLocalClientType)((char*)baseAddress + 0x78200);
-
- /* NOTE:
- g_pCVar->FindVar("convar_name") now works. These are no longer needed.
- You can also itterate over every ConVar using CCVarIteratorInternal
- dump the pointers to a vector and access them from there.
- Example:
- std::vector<ConVar*> g_pAllConVars;
- for (auto& map : g_pCVar->DumpToMap())
- {
- ConVar* pConVar = g_pCVar->FindVar(map.first.c_str());
- if (pConVar)
- {
- g_pAllConVars.push_back(pConVar);
- }
- }*/
-}
-
-void InitialiseServerGameUtilFunctions(HMODULE baseAddress)
-{
- Server_GetEntityByIndex = (Server_GetEntityByIndexType)((char*)baseAddress + 0xFB820);
-} \ No newline at end of file