aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/demofixes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDedicatedTest/demofixes.cpp')
-rw-r--r--NorthstarDedicatedTest/demofixes.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/NorthstarDedicatedTest/demofixes.cpp b/NorthstarDedicatedTest/demofixes.cpp
index fba94183..ff06ae12 100644
--- a/NorthstarDedicatedTest/demofixes.cpp
+++ b/NorthstarDedicatedTest/demofixes.cpp
@@ -2,12 +2,15 @@
#include "convar.h"
#include "NSMem.h"
-ON_DLL_LOAD_CLIENT_RELIESON("client.dll", DemoFixes, ConVar, [](HMODULE baseAddress)
+ON_DLL_LOAD_CLIENT("engine.dll", EngineDemoFixes, [](HMODULE baseAddress)
{
// allow demo recording on loopback
- NSMem::NOP((uintptr_t)GetModuleHandleA("engine.dll") + 0x8E1B1, 2);
- NSMem::NOP((uintptr_t)GetModuleHandleA("engine.dll") + 0x56CC3, 2);
+ NSMem::NOP((uintptr_t)baseAddress + 0x8E1B1, 2);
+ NSMem::NOP((uintptr_t)baseAddress + 0x56CC3, 2);
+})
+ON_DLL_LOAD_CLIENT_RELIESON("client.dll", ClientDemoFixes, ConVar, [](HMODULE baseAddress)
+{
// change default values of demo cvars to enable them by default, but not autorecord
// this is before Host_Init, the setvalue calls here will get overwritten by custom cfgs/launch options
ConVar* Cvar_demo_enableDemos = R2::g_pCVar->FindVar("demo_enabledemos");