diff options
author | BobTheBob9 <for.oliver.kirkham@gmail.com> | 2022-07-24 20:55:34 +0100 |
---|---|---|
committer | BobTheBob9 <for.oliver.kirkham@gmail.com> | 2022-07-24 20:55:34 +0100 |
commit | 52dc6d143fec8eabb9958bacbdbf6f1b4b4af592 (patch) | |
tree | 61473cc529921fa622d7815b06c8530234248034 /NorthstarDLL/convar.cpp | |
parent | b0bef05111a95a4cce6250d2b79e2aa5baa6dd98 (diff) | |
download | NorthstarLauncher-52dc6d143fec8eabb9958bacbdbf6f1b4b4af592.tar.gz NorthstarLauncher-52dc6d143fec8eabb9958bacbdbf6f1b4b4af592.zip |
add new memory lib
Diffstat (limited to 'NorthstarDLL/convar.cpp')
-rw-r--r-- | NorthstarDLL/convar.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/NorthstarDLL/convar.cpp b/NorthstarDLL/convar.cpp index 7bef2f6d..10e7c859 100644 --- a/NorthstarDLL/convar.cpp +++ b/NorthstarDLL/convar.cpp @@ -26,13 +26,13 @@ void* g_pIConVar_Vtable = nullptr; //-----------------------------------------------------------------------------
// Purpose: ConVar interface initialization
//-----------------------------------------------------------------------------
-ON_DLL_LOAD("engine.dll", ConVar, (HMODULE baseAddress))
+ON_DLL_LOAD("engine.dll", ConVar, (CModule module))
{
- conVarMalloc = (ConVarMallocType)((char*)baseAddress + 0x415C20);
- conVarRegister = (ConVarRegisterType)((char*)baseAddress + 0x417230);
+ conVarMalloc = module.Offset(0x415C20).As<ConVarMallocType>();
+ conVarRegister = module.Offset(0x417230).As<ConVarRegisterType>();
- g_pConVar_Vtable = (char*)baseAddress + 0x67FD28;
- g_pIConVar_Vtable = (char*)baseAddress + 0x67FDC8;
+ g_pConVar_Vtable = module.Offset(0x67FD28);
+ g_pIConVar_Vtable = module.Offset(0x67FDC8);
R2::g_pCVarInterface = new SourceInterface<CCvar>("vstdlib.dll", "VEngineCvar007");
R2::g_pCVar = *R2::g_pCVarInterface;
|