diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-05-12 02:33:01 +0100 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-05-12 02:33:01 +0100 |
commit | 6768e46b200c63d758bd6e92bd500f3c754c3245 (patch) | |
tree | 47a0e90999cd8fc933301197f7104a94d567471c /NorthstarDedicatedTest/miscclientfixes.cpp | |
parent | 8a33725513d7dae6a0be3b8366976e17661d2e2e (diff) | |
download | NorthstarLauncher-6768e46b200c63d758bd6e92bd500f3c754c3245.tar.gz NorthstarLauncher-6768e46b200c63d758bd6e92bd500f3c754c3245.zip |
formatting changes
Diffstat (limited to 'NorthstarDedicatedTest/miscclientfixes.cpp')
-rw-r--r-- | NorthstarDedicatedTest/miscclientfixes.cpp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/NorthstarDedicatedTest/miscclientfixes.cpp b/NorthstarDedicatedTest/miscclientfixes.cpp index 777d5696..bb59b539 100644 --- a/NorthstarDedicatedTest/miscclientfixes.cpp +++ b/NorthstarDedicatedTest/miscclientfixes.cpp @@ -5,49 +5,6 @@ #include "hookutils.h" #include "NSMem.h" -typedef void* (*CrashingWeaponActivityFuncType)(void* a1); -CrashingWeaponActivityFuncType CrashingWeaponActivityFunc0; -CrashingWeaponActivityFuncType CrashingWeaponActivityFunc1; - -ConVar* Cvar_ns_cl_move_always_send; - -void* CrashingWeaponActivityFunc0Hook(void* a1) -{ - // this return is safe, other functions that use this value seemingly dont care about it being null - if (!a1) - return 0; - - return CrashingWeaponActivityFunc0(a1); -} - -void* CrashingWeaponActivityFunc1Hook(void* a1) -{ - // this return is safe, other functions that use this value seemingly dont care about it being null - if (!a1) - return 0; - - return CrashingWeaponActivityFunc1(a1); -} - ON_DLL_LOAD_CLIENT_RELIESON("client.dll", MiscClientFixes, ConVar, [](HMODULE baseAddress) { - HookEnabler hook; - - // allow demo recording on loopback - NSMem::NOP((uintptr_t)GetModuleHandleA("engine.dll") + 0x8E1B1, 2); - NSMem::NOP((uintptr_t)GetModuleHandleA("engine.dll") + 0x56CC3, 2); - - // 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 = g_pCVar->FindVar("demo_enabledemos"); - Cvar_demo_enableDemos->m_pszDefaultValue = "1"; - Cvar_demo_enableDemos->SetValue(true); - - ConVar* Cvar_demo_writeLocalFile = g_pCVar->FindVar("demo_writeLocalFile"); - Cvar_demo_writeLocalFile->m_pszDefaultValue = "1"; - Cvar_demo_writeLocalFile->SetValue(true); - - ConVar* Cvar_demo_autoRecord = g_pCVar->FindVar("demo_autoRecord"); - Cvar_demo_autoRecord->m_pszDefaultValue = "0"; - Cvar_demo_autoRecord->SetValue(false); })
\ No newline at end of file |