diff options
author | HappyDOGE <28511119+HappyDOGE@users.noreply.github.com> | 2021-12-27 19:56:08 +0300 |
---|---|---|
committer | HappyDOGE <28511119+HappyDOGE@users.noreply.github.com> | 2021-12-27 19:56:08 +0300 |
commit | 1cb1d1e19804d1b7b52c8b2bd21f10dde4bf6bf8 (patch) | |
tree | d38f1cc4c42990350ac6ec9ea765191f07e2a47e /NorthstarDedicatedTest/maxplayers.cpp | |
parent | bf41a73a0a9d3c5c26086559570a9d6502f137c3 (diff) | |
download | NorthstarLauncher-1cb1d1e19804d1b7b52c8b2bd21f10dde4bf6bf8.tar.gz NorthstarLauncher-1cb1d1e19804d1b7b52c8b2bd21f10dde4bf6bf8.zip |
remove hook preload as it's not crossplatform
use a universal solution instead
Diffstat (limited to 'NorthstarDedicatedTest/maxplayers.cpp')
-rw-r--r-- | NorthstarDedicatedTest/maxplayers.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/NorthstarDedicatedTest/maxplayers.cpp b/NorthstarDedicatedTest/maxplayers.cpp index 1c984c96..e649b0a6 100644 --- a/NorthstarDedicatedTest/maxplayers.cpp +++ b/NorthstarDedicatedTest/maxplayers.cpp @@ -427,6 +427,10 @@ void InitialiseMaxPlayersOverride_Server(HMODULE baseAddress) // GameLoop::RunUserCmds - rebuild HookEnabler hook; ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x483D10, &RunUserCmds_Hook, reinterpret_cast<LPVOID*>(&RunUserCmds_Original)); + + *(DWORD*)((char*)baseAddress + 0x14E7390) = 0; + auto DT_PlayerResource_Construct = (__int64(__fastcall*)())((char*)baseAddress + 0x5C4FE0); + DT_PlayerResource_Construct(); } void InitialiseMaxPlayersOverride_Client(HMODULE baseAddress) @@ -579,4 +583,8 @@ void InitialiseMaxPlayersOverride_Client(HMODULE baseAddress) // Some other get name func 2 (that seems to be unused too) - change m_bConnected address ChangeOffset<unsigned int>((char*)baseAddress + 0x164834 + 3, C_PlayerResource_OriginalSize + PlayerResource_Connected_Start); + + *(DWORD*)((char*)baseAddress + 0xC35068) = 0; + auto DT_PlayerResource_Construct = (__int64(__fastcall*)())((char*)baseAddress + 0x163400); + DT_PlayerResource_Construct(); }
\ No newline at end of file |