aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/gameutils.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-02 00:29:12 +0000
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-02 00:29:12 +0000
commitf33bab4fb3586fd06896a7730bce8913c2616b78 (patch)
tree484bc51055c9ad810fa4bfd1c0b1b0e35ae03096 /NorthstarDedicatedTest/gameutils.cpp
parentac0c658516d8eaef2c788624f94e974ef47acbb8 (diff)
downloadNorthstarLauncher-f33bab4fb3586fd06896a7730bce8913c2616b78.tar.gz
NorthstarLauncher-f33bab4fb3586fd06896a7730bce8913c2616b78.zip
tier0 code cleanup and loadlibrary hook fix
Diffstat (limited to 'NorthstarDedicatedTest/gameutils.cpp')
-rw-r--r--NorthstarDedicatedTest/gameutils.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/NorthstarDedicatedTest/gameutils.cpp b/NorthstarDedicatedTest/gameutils.cpp
index 2ad2821c..714395c6 100644
--- a/NorthstarDedicatedTest/gameutils.cpp
+++ b/NorthstarDedicatedTest/gameutils.cpp
@@ -36,6 +36,10 @@ char* g_LocalPlayerOriginToken;
// misc stuff
ConVar* Cvar_match_defaultMap;
+ConVar* Cvar_communities_hostname;
+ErrorType Error;
+CommandLineType CommandLine;
+Plat_FloatTimeType Plat_FloatTime;
void InitialiseEngineGameUtilFunctions(HMODULE baseAddress)
{
@@ -57,6 +61,7 @@ void InitialiseEngineGameUtilFunctions(HMODULE baseAddress)
g_LocalPlayerOriginToken = (char*)baseAddress + 0x13979C80;
Cvar_match_defaultMap = (ConVar*)((char*)baseAddress + 0x8AB530);
+ Cvar_communities_hostname = (ConVar*)((char*)baseAddress + 0x13157E50);
}
void InitialiseServerGameUtilFunctions(HMODULE baseAddress)
@@ -64,4 +69,13 @@ void InitialiseServerGameUtilFunctions(HMODULE baseAddress)
Server_GetEntityByIndex = (Server_GetEntityByIndexType)((char*)baseAddress + 0xFB820);
Cvar_base_tickinterval_mp = (ConVar*)((char*)baseAddress + 0xBFC360);
Cvar_base_tickinterval_mp = (ConVar*)((char*)baseAddress + 0xBFBEA0);
+}
+
+void InitialiseTier0GameUtilFunctions(HMODULE baseAddress)
+{
+ baseAddress = GetModuleHandleA("tier0.dll");
+
+ Error = (ErrorType)GetProcAddress(baseAddress, "Error");
+ CommandLine = (CommandLineType)GetProcAddress(baseAddress, "CommandLine");
+ Plat_FloatTime = (Plat_FloatTimeType)GetProcAddress(baseAddress, "Plat_FloatTime");
} \ No newline at end of file