diff options
author | BobTheBob9 <for.oliver.kirkham@gmail.com> | 2022-07-24 20:55:34 +0100 |
---|---|---|
committer | BobTheBob9 <for.oliver.kirkham@gmail.com> | 2022-07-24 20:55:34 +0100 |
commit | 52dc6d143fec8eabb9958bacbdbf6f1b4b4af592 (patch) | |
tree | 61473cc529921fa622d7815b06c8530234248034 /NorthstarDLL/serverauthentication.cpp | |
parent | b0bef05111a95a4cce6250d2b79e2aa5baa6dd98 (diff) | |
download | NorthstarLauncher-52dc6d143fec8eabb9958bacbdbf6f1b4b4af592.tar.gz NorthstarLauncher-52dc6d143fec8eabb9958bacbdbf6f1b4b4af592.zip |
add new memory lib
Diffstat (limited to 'NorthstarDLL/serverauthentication.cpp')
-rw-r--r-- | NorthstarDLL/serverauthentication.cpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/NorthstarDLL/serverauthentication.cpp b/NorthstarDLL/serverauthentication.cpp index 3fe6b10b..a8aa678d 100644 --- a/NorthstarDLL/serverauthentication.cpp +++ b/NorthstarDLL/serverauthentication.cpp @@ -10,7 +10,6 @@ #include "concommand.h"
#include "dedicated.h"
#include "nsprefix.h"
-#include "NSMem.h"
#include "tier0.h"
#include "r2engine.h"
#include "r2client.h"
@@ -341,7 +340,7 @@ void ConCommand_ns_resetpersistence(const CCommand& args) g_pServerAuthentication->m_bForceResetLocalPlayerPersistence = true;
}
-ON_DLL_LOAD_RELIESON("engine.dll", ServerAuthentication, (ConCommand, ConVar), (HMODULE baseAddress))
+ON_DLL_LOAD_RELIESON("engine.dll", ServerAuthentication, (ConCommand, ConVar), (CModule module))
{
AUTOHOOK_DISPATCH()
@@ -361,23 +360,12 @@ ON_DLL_LOAD_RELIESON("engine.dll", ServerAuthentication, (ConCommand, ConVar), ( RegisterConCommand(
"ns_resetpersistence", ConCommand_ns_resetpersistence, "resets your pdata when you next enter the lobby", FCVAR_NONE);
- uintptr_t ba = (uintptr_t)baseAddress;
-
// patch to disable kicking based on incorrect serverfilter in connectclient, since we repurpose it for use as an auth token
- NSMem::BytePatch(
- ba + 0x114655,
- "EB" // jz => jmp
- );
+ module.Offset(0x114655).Patch("EB");
// patch to disable fairfight marking players as cheaters and kicking them
- NSMem::BytePatch(
- ba + 0x101012,
- "E9 90 00" // jz => jmp
- );
+ module.Offset(0x101012).Patch("E9 90 00");
// patch to allow same of multiple account
- NSMem::BytePatch(
- ba + 0x114510,
- "EB" // jz => jmp
- );
+ module.Offset(0x114510).Patch("EB");
}
\ No newline at end of file |