diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-05-26 23:09:15 +0100 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-05-26 23:09:15 +0100 |
commit | 2171d95e1221442081bade7929c05b82ca0f2a08 (patch) | |
tree | 78e2d33c13fb0353e3869b08b15c3a6cc3c60393 /NorthstarDedicatedTest/buildainfile.cpp | |
parent | cc7b0ded08e3dc26fc970169a79c74c54e4f923b (diff) | |
download | NorthstarLauncher-2171d95e1221442081bade7929c05b82ca0f2a08.tar.gz NorthstarLauncher-2171d95e1221442081bade7929c05b82ca0f2a08.zip |
update more stuff to new hook macros
Diffstat (limited to 'NorthstarDedicatedTest/buildainfile.cpp')
-rw-r--r-- | NorthstarDedicatedTest/buildainfile.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/NorthstarDedicatedTest/buildainfile.cpp b/NorthstarDedicatedTest/buildainfile.cpp index ea9d69ef..a80185e5 100644 --- a/NorthstarDedicatedTest/buildainfile.cpp +++ b/NorthstarDedicatedTest/buildainfile.cpp @@ -1,8 +1,10 @@ #include "pch.h" #include "convar.h" +#include "hoststate.h" +#include "NSMem.h" + #include <fstream> #include <filesystem> -#include "NSMem.h" AUTOHOOK_INIT() @@ -161,14 +163,13 @@ struct CAI_Network }; char** pUnkServerMapversionGlobal; -char* pMapName; ConVar* Cvar_ns_ai_dumpAINfileFromLoad; void DumpAINInfo(CAI_Network* aiNetwork) { fs::path writePath("r2/maps/graphs"); - writePath /= pMapName; + writePath /= R2::g_pHostState->m_levelName; writePath += ".ain"; // dump from memory @@ -370,14 +371,14 @@ void,, (void* aimanager, void* buf, const char* filename), ON_DLL_LOAD("server.dll", BuildAINFile, [](HMODULE baseAddress) { + 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); - pMapName = (char*)baseAddress + 0x1053370; });
\ No newline at end of file |