diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-08-24 00:32:31 +0100 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-08-25 21:32:55 +0200 |
commit | 46bed8d09f32360377350d71816a76abdfbf2c7c (patch) | |
tree | 7feedae4910dbfe0e53d26ea1e00c4616d2c1850 /NorthstarDedicatedTest/miscclientfixes.cpp | |
parent | a97f1f07bb5aa31629cd87023e09669eb4bf1fe9 (diff) | |
download | NorthstarLauncher-1.9.5-rc1.tar.gz NorthstarLauncher-1.9.5-rc1.zip |
Adjust folder structure (#242)v1.9.5-rc1v1.9.5
* Adjust folder structure
* change launcher directory name
Diffstat (limited to 'NorthstarDedicatedTest/miscclientfixes.cpp')
-rw-r--r-- | NorthstarDedicatedTest/miscclientfixes.cpp | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/NorthstarDedicatedTest/miscclientfixes.cpp b/NorthstarDedicatedTest/miscclientfixes.cpp deleted file mode 100644 index 62ffd4a4..00000000 --- a/NorthstarDedicatedTest/miscclientfixes.cpp +++ /dev/null @@ -1,49 +0,0 @@ -#include "pch.h" -#include "miscclientfixes.h" -#include "hookutils.h" -#include "dedicated.h" - -typedef void* (*CrashingWeaponActivityFuncType)(void* a1); -CrashingWeaponActivityFuncType CrashingWeaponActivityFunc0; -CrashingWeaponActivityFuncType CrashingWeaponActivityFunc1; - -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); -} - -void InitialiseMiscClientFixes(HMODULE baseAddress) -{ - if (IsDedicated()) - return; - - HookEnabler hook; - - // these functions will occasionally pass a null pointer on respawn, unsure what causes this but seems easiest just to return null if - // null, which seems to work fine fucking sucks this has to be fixed like this but unsure what exactly causes this serverside, breaks - // vanilla compatibility to a degree tho will say i have about 0 clue what exactly these functions do, testing this it doesn't even seem - // like they do much of anything i can see tbh - ENABLER_CREATEHOOK( - hook, (char*)baseAddress + 0x5A92D0, &CrashingWeaponActivityFunc0Hook, reinterpret_cast<LPVOID*>(&CrashingWeaponActivityFunc0)); - ENABLER_CREATEHOOK( - hook, (char*)baseAddress + 0x5A9310, &CrashingWeaponActivityFunc1Hook, reinterpret_cast<LPVOID*>(&CrashingWeaponActivityFunc1)); - - // experimental: allow cl_extrapolate to be enabled without cheats - { - void* ptr = (char*)baseAddress + 0x275F9D9; - *((char*)ptr) = (char)0; - } -}
\ No newline at end of file |