diff options
author | BobTheBob <for.oliver.kirkham@gmail.com> | 2023-03-08 03:57:48 +0000 |
---|---|---|
committer | BobTheBob <for.oliver.kirkham@gmail.com> | 2023-03-08 03:57:48 +0000 |
commit | a4276598c8e812bd76b356cbac5e60336575dbf1 (patch) | |
tree | 77d4a01837894474d27e834b79455d2bf2a5ba35 /NorthstarDLL/core | |
parent | 3292ad7d2a14f202df99fe46d3b9eb83277f1f21 (diff) | |
download | NorthstarLauncher-a4276598c8e812bd76b356cbac5e60336575dbf1.tar.gz NorthstarLauncher-a4276598c8e812bd76b356cbac5e60336575dbf1.zip |
fix crash while loading weapons and implement (currently disabled)modloading-rewrite-pr
automatic remote mod unloading
Diffstat (limited to 'NorthstarDLL/core')
-rw-r--r-- | NorthstarDLL/core/hooks.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/NorthstarDLL/core/hooks.cpp b/NorthstarDLL/core/hooks.cpp index 7c70b0a5..fe570efb 100644 --- a/NorthstarDLL/core/hooks.cpp +++ b/NorthstarDLL/core/hooks.cpp @@ -76,6 +76,10 @@ void __fileAutohook::DispatchForModule(const char* pModuleName) { const int iModuleNameLen = strlen(pModuleName); + for (__autovar* var : vars) + if (!strncmp(pModuleName, var->m_pAddrString, iModuleNameLen)) + var->Dispatch(); + for (__autohook* hook : hooks) if ((hook->iAddressResolutionMode == __autohook::OFFSET_STRING && !strncmp(pModuleName, hook->pAddrString, iModuleNameLen)) || (hook->iAddressResolutionMode == __autohook::PROCADDRESS && !strcmp(pModuleName, hook->pModuleName))) |