From 73262ca616f0623a9715ceac90c17b0da4b320d7 Mon Sep 17 00:00:00 2001 From: Jack <66967891+ASpoonPlaysGames@users.noreply.github.com> Date: Mon, 5 Feb 2024 17:01:22 +0000 Subject: 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 Co-authored-by: Maya <11448698+RoyalBlue1@users.noreply.github.com> --- primedev/shared/exploit_fixes/exploitfixes.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'primedev/shared/exploit_fixes') 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) { -- cgit v1.2.3