aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/ExploitFixes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDedicatedTest/ExploitFixes.cpp')
-rw-r--r--NorthstarDedicatedTest/ExploitFixes.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/NorthstarDedicatedTest/ExploitFixes.cpp b/NorthstarDedicatedTest/ExploitFixes.cpp
index db754ad5..257ec428 100644
--- a/NorthstarDedicatedTest/ExploitFixes.cpp
+++ b/NorthstarDedicatedTest/ExploitFixes.cpp
@@ -2,6 +2,7 @@
#include "ExploitFixes.h"
#include "ExploitFixes_UTF8Parser.h"
+#include "hooks.h"
#include "NSMem.h"
#include "cvar.h"
@@ -46,6 +47,8 @@ struct Angle
bool IsInvalid()
{
+ return !ValidateFloats(pitch, yaw, roll);
+
if (!ValidateFloats(pitch, yaw, roll))
return false;
@@ -205,12 +208,14 @@ KHOOK(CClient_ProcessUsercmds, ("engine.dll", "40 55 56 48 83 EC 58"), bool, __f
{
return BLOCKED_INFO("Invalid m_nNewCommands (" << msg->m_nNewCommands << ")");
}
-
- constexpr int NUMCMD_SANITY_LIMIT = 16;
+
+ // removing, as vanilla already limits num usercmds per frame
+ /*constexpr int NUMCMD_SANITY_LIMIT = 16;
if ((msg->m_nNewCommands + msg->m_nBackupCommands) > NUMCMD_SANITY_LIMIT)
{
return BLOCKED_INFO("Command count is too high (new: " << msg->m_nNewCommands << ", backup: " << msg->m_nBackupCommands << ")");
- }
+
+ }*/
if (msg->m_nLength <= 0)
return BLOCKED_INFO("Invalid message length (" << msg->m_nLength << ")");
@@ -394,7 +399,7 @@ void DoBytePatches()
}
}
-void ExploitFixes::LoadCallback(HMODULE unused)
+ON_DLL_LOAD_RELIESON("server.dll", ExploitFixes, ConVar, (HMODULE baseAddress)
{
spdlog::info("ExploitFixes::LoadCallback ...");
@@ -416,4 +421,4 @@ void ExploitFixes::LoadCallback(HMODULE unused)
ns_exploitfixes_log =
new ConVar("ns_exploitfixes_log", "1", FCVAR_GAMEDLL, "Whether to log whenever ExploitFixes.cpp blocks/corrects something");
-} \ No newline at end of file
+}) \ No newline at end of file