aboutsummaryrefslogtreecommitdiff
path: root/primedev/shared
diff options
context:
space:
mode:
Diffstat (limited to 'primedev/shared')
-rw-r--r--primedev/shared/exploit_fixes/exploitfixes.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/primedev/shared/exploit_fixes/exploitfixes.cpp b/primedev/shared/exploit_fixes/exploitfixes.cpp
index 44651b3c..cade4084 100644
--- a/primedev/shared/exploit_fixes/exploitfixes.cpp
+++ b/primedev/shared/exploit_fixes/exploitfixes.cpp
@@ -222,16 +222,24 @@ void, __fastcall, (void* buf, void* pCmd_move, void* pCmd_from)) // 4C 89 44 24
"ReadUsercmd (command_number delta: " + std::to_string(cmd->command_number - fromCmd->command_number) + "): ";
// fix invalid player angles
- cmd->worldViewAngles.MakeValid();
- cmd->attackangles.MakeValid();
- cmd->localViewAngles.MakeValid();
+ if (!cmd->worldViewAngles.IsValid())
+ cmd->worldViewAngles.Init();
+
+ if (!cmd->attackangles.IsValid())
+ cmd->attackangles.Init();
+
+ if (!cmd->localViewAngles.IsValid())
+ cmd->localViewAngles.Init();
// Fix invalid camera angles
- cmd->cameraPos.MakeValid();
- cmd->cameraAngles.MakeValid();
+ if (!cmd->cameraPos.IsValid())
+ cmd->cameraPos.Init();
+ if (!cmd->cameraAngles.IsValid())
+ cmd->cameraAngles.Init();
// Fix invaid movement vector
- cmd->move.MakeValid();
+ if (!cmd->move.IsValid())
+ cmd->move.Init();
if (cmd->frameTime <= 0 || cmd->tick_count == 0 || cmd->command_time <= 0)
{