aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/clientvideooverrides.cpp
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-13 10:06:42 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-13 10:06:42 +0200
commit01da3cecf2c8d998d4e4caa424635b15bdab4189 (patch)
tree91da1b0fa15dbff47150d1c5415f049e09a37080 /NorthstarDLL/clientvideooverrides.cpp
parent57d21107a300125f2a62e0025b20a905e2ca234a (diff)
downloadNorthstarLauncher-01da3cecf2c8d998d4e4caa424635b15bdab4189.tar.gz
NorthstarLauncher-01da3cecf2c8d998d4e4caa424635b15bdab4189.zip
Revert "Revert "allow mods to load biks that aren't already present in r2/media (#137)""test-revert-bik-load
This reverts commit 88c82bc30fe11fcfa28646bb2720266e023e2e23.
Diffstat (limited to 'NorthstarDLL/clientvideooverrides.cpp')
-rw-r--r--NorthstarDLL/clientvideooverrides.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/NorthstarDLL/clientvideooverrides.cpp b/NorthstarDLL/clientvideooverrides.cpp
index c5989968..659bf23c 100644
--- a/NorthstarDLL/clientvideooverrides.cpp
+++ b/NorthstarDLL/clientvideooverrides.cpp
@@ -1,6 +1,7 @@
#include "pch.h"
#include "clientvideooverrides.h"
#include "modmanager.h"
+#include "nsmem.h"
typedef void* (*BinkOpenType)(const char* path, uint32_t flags);
BinkOpenType BinkOpen;
@@ -31,8 +32,12 @@ void* BinkOpenHook(const char* path, uint32_t flags)
return BinkOpen(path, flags);
}
-void InitialiseClientVideoOverrides(HMODULE baseAddress)
+void InitialiseEngineClientVideoOverrides(HMODULE baseAddress)
{
+ // remove engine check for whether the bik we're trying to load exists in r2/media, as this will fail for biks in mods
+ // note: the check in engine is actually unnecessary, so it's just useless in practice and we lose nothing by removing it
+ NSMem::NOP((uintptr_t)baseAddress + 0x459AD, 6);
+
HookEnabler hook;
ENABLER_CREATEHOOK(
hook,