aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/core
diff options
context:
space:
mode:
authorBobTheBob <for.oliver.kirkham@gmail.com>2023-03-08 03:57:48 +0000
committerBobTheBob <for.oliver.kirkham@gmail.com>2023-03-08 03:57:48 +0000
commita4276598c8e812bd76b356cbac5e60336575dbf1 (patch)
tree77d4a01837894474d27e834b79455d2bf2a5ba35 /NorthstarDLL/core
parent3292ad7d2a14f202df99fe46d3b9eb83277f1f21 (diff)
downloadNorthstarLauncher-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.cpp4
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)))