aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/exploitfixes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDLL/exploitfixes.cpp')
-rw-r--r--NorthstarDLL/exploitfixes.cpp30
1 files changed, 7 insertions, 23 deletions
diff --git a/NorthstarDLL/exploitfixes.cpp b/NorthstarDLL/exploitfixes.cpp
index dbe065cc..419fc448 100644
--- a/NorthstarDLL/exploitfixes.cpp
+++ b/NorthstarDLL/exploitfixes.cpp
@@ -5,6 +5,7 @@
#include "tier0.h"
#include "r2engine.h"
#include "r2client.h"
+#include "vector.h"
AUTOHOOK_INIT()
@@ -26,23 +27,6 @@ ConVar* Cvar_sv_cheats;
return false; \
}())
-// Make sure 3 or less floats are valid
-bool ValidateFloats(float a, float b = 0, float c = 0)
-{
- return !isnan(a) && !isnan(b) && !isnan(c);
-}
-
-struct Float3
-{
- float vals[3];
-
- void MakeValid()
- {
- for (auto& val : vals)
- if (isnan(val))
- val = 0;
- }
-};
// block bad netmessages
// Servers can literally request a screenshot from any client, yeah no
AUTOHOOK(CLC_Screenshot_WriteToBuffer, engine.dll + 0x22AF20,
@@ -209,11 +193,11 @@ void, __fastcall, (void* buf, void* pCmd_move, void* pCmd_from)) // 4C 89 44 24
DWORD command_number;
DWORD tick_count;
float command_time;
- Float3 worldViewAngles;
+ Vector3 worldViewAngles;
BYTE gap18[4];
- Float3 localViewAngles;
- Float3 attackangles;
- Float3 move;
+ Vector3 localViewAngles;
+ Vector3 attackangles;
+ Vector3 move;
DWORD buttons;
BYTE impulse;
short weaponselect;
@@ -221,8 +205,8 @@ void, __fastcall, (void* buf, void* pCmd_move, void* pCmd_from)) // 4C 89 44 24
BYTE gap4C[24];
char headoffset;
BYTE gap65[11];
- Float3 cameraPos;
- Float3 cameraAngles;
+ Vector3 cameraPos;
+ Vector3 cameraAngles;
BYTE gap88[4];
int tickSomething;
DWORD dword90;