aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/buildainfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDLL/buildainfile.cpp')
-rw-r--r--NorthstarDLL/buildainfile.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/NorthstarDLL/buildainfile.cpp b/NorthstarDLL/buildainfile.cpp
index 1ac73b43..c91aa30e 100644
--- a/NorthstarDLL/buildainfile.cpp
+++ b/NorthstarDLL/buildainfile.cpp
@@ -2,7 +2,6 @@
#include "convar.h"
#include "hoststate.h"
#include "r2engine.h"
-#include "NSMem.h"
#include <fstream>
#include <filesystem>
@@ -384,16 +383,16 @@ void,, (void* aimanager, void* buf, const char* filename))
}
}
-ON_DLL_LOAD("server.dll", BuildAINFile, (HMODULE baseAddress))
+ON_DLL_LOAD("server.dll", BuildAINFile, (CModule module))
{
AUTOHOOK_DISPATCH()
Cvar_ns_ai_dumpAINfileFromLoad = new ConVar(
"ns_ai_dumpAINfileFromLoad", "0", FCVAR_NONE, "For debugging: whether we should dump ain data for ains loaded from disk");
- pUnkStruct0Count = (int*)((char*)baseAddress + 0x1063BF8);
- pppUnkNodeStruct0s = (UnkNodeStruct0***)((char*)baseAddress + 0x1063BE0);
- pUnkLinkStruct1Count = (int*)((char*)baseAddress + 0x1063AA8);
- pppUnkStruct1s = (UnkLinkStruct1***)((char*)baseAddress + 0x1063A90);
- pUnkServerMapversionGlobal = (char**)((char*)baseAddress + 0xBFBE08);
+ pUnkStruct0Count = module.Offset(0x1063BF8).As<int*>();
+ pppUnkNodeStruct0s = module.Offset(0x1063BE0).As<UnkNodeStruct0***>();
+ pUnkLinkStruct1Count = module.Offset(0x1063AA8).As<int*>();
+ pppUnkStruct1s = module.Offset(0x1063A90).As<UnkLinkStruct1***>();
+ pUnkServerMapversionGlobal = module.Offset(0xBFBE08).As<char**>();
} \ No newline at end of file