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/demofixes.cpp | |
parent | cc7b0ded08e3dc26fc970169a79c74c54e4f923b (diff) | |
download | NorthstarLauncher-2171d95e1221442081bade7929c05b82ca0f2a08.tar.gz NorthstarLauncher-2171d95e1221442081bade7929c05b82ca0f2a08.zip |
update more stuff to new hook macros
Diffstat (limited to 'NorthstarDedicatedTest/demofixes.cpp')
-rw-r--r-- | NorthstarDedicatedTest/demofixes.cpp | 9 |
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"); |