aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/securitypatches.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-03-22 19:46:13 +0000
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-03-22 19:46:13 +0000
commit2cb92fc902153b0fb50b367271517fbbd0900ace (patch)
treea891560a1924c53af29e682294b8ef3bbf2257d0 /NorthstarDedicatedTest/securitypatches.cpp
parent92f77b231ac324cc1326bef31251fc6b86df1f3b (diff)
downloadNorthstarLauncher-2cb92fc902153b0fb50b367271517fbbd0900ace.tar.gz
NorthstarLauncher-2cb92fc902153b0fb50b367271517fbbd0900ace.zip
remove ClientCommandKeyValues
Diffstat (limited to 'NorthstarDedicatedTest/securitypatches.cpp')
-rw-r--r--NorthstarDedicatedTest/securitypatches.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/NorthstarDedicatedTest/securitypatches.cpp b/NorthstarDedicatedTest/securitypatches.cpp
index ee16593b..9352559a 100644
--- a/NorthstarDedicatedTest/securitypatches.cpp
+++ b/NorthstarDedicatedTest/securitypatches.cpp
@@ -16,12 +16,18 @@ bool IsValveModHook()
return !CommandLine()->CheckParm("-norestrictservercommands");
}
+typedef bool (*SVC_CmdKeyValues__ReadFromBufferType)(void* a1, void* a2);
+SVC_CmdKeyValues__ReadFromBufferType SVC_CmdKeyValues__ReadFromBuffer;
+// never parse server=>client keyvalues for clientcommandkeyvalues
+bool SVC_CmdKeyValues__ReadFromBufferHook(void* a1, void* a2) { return false; }
+
void InitialiseClientEngineSecurityPatches(HMODULE baseAddress)
{
HookEnabler hook;
// note: this could break some things
ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x1C6360, &IsValveModHook, reinterpret_cast<LPVOID*>(&IsValveMod));
+ ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x222E70, &SVC_CmdKeyValues__ReadFromBufferHook, reinterpret_cast<LPVOID*>(&SVC_CmdKeyValues__ReadFromBuffer));
// patches to make commands run from client/ui script still work
// note: this is likely preventable in a nicer way? test prolly