aboutsummaryrefslogtreecommitdiff
path: root/primedev/shared/exploit_fixes/exploitfixes.cpp
diff options
context:
space:
mode:
authorJack <66967891+ASpoonPlaysGames@users.noreply.github.com>2024-02-05 17:01:22 +0000
committerGitHub <noreply@github.com>2024-02-05 18:01:22 +0100
commit73262ca616f0623a9715ceac90c17b0da4b320d7 (patch)
tree4624e5eec9329afdee0bfb67ccc64e9a935d4484 /primedev/shared/exploit_fixes/exploitfixes.cpp
parentedf013952ca2d110f190dc8cd16e5529846656e4 (diff)
downloadNorthstarLauncher-73262ca616f0623a9715ceac90c17b0da4b320d7.tar.gz
NorthstarLauncher-73262ca616f0623a9715ceac90c17b0da4b320d7.zip
Port navmesh debug renderer from primedev (#626)
Adds support for rendering navmeshes in-game using debug overlay Cherry-picked from primedev, originally written by F1F7Y Co-authored-by: F1F7Y <filip.bartos07@proton.me> Co-authored-by: Maya <11448698+RoyalBlue1@users.noreply.github.com>
Diffstat (limited to 'primedev/shared/exploit_fixes/exploitfixes.cpp')
-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)
{