From efa2c77be7f296ca3c2b74f91a2ec620341dc357 Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Thu, 16 Jun 2022 01:01:10 +0200 Subject: Move #define to top of file --- NorthstarDedicatedTest/ExploitFixes.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/NorthstarDedicatedTest/ExploitFixes.cpp b/NorthstarDedicatedTest/ExploitFixes.cpp index 79287d4d..3bd913d1 100644 --- a/NorthstarDedicatedTest/ExploitFixes.cpp +++ b/NorthstarDedicatedTest/ExploitFixes.cpp @@ -5,6 +5,10 @@ #include "NSMem.h" #include "cvar.h" +#define FORCE_3_VALID(name) \ + if (name.IsInvalid()) \ + name = {0, 0, 0} + typedef char(__fastcall* function_containing_emit_t)(uint64_t a1, uint64_t a2); function_containing_emit_t function_containing_emit; ConVar* sv_cheats; @@ -260,10 +264,6 @@ KHOOK(ReadUsercmd, ("server.dll", "4C 89 44 24 ? 53 55 56 57"), void, __fastcall std::string BLOCK_PREFIX = "ReadUsercmd (command_number delta: " + std::to_string(cmd->command_number - fromCmd->command_number) + "): "; -#define FORCE_3_VALID(name) \ - if (name.IsInvalid()) \ - name = {0, 0, 0} - FORCE_3_VALID(cmd->localViewAngles); FORCE_3_VALID(cmd->cameraAngles); FORCE_3_VALID(cmd->attackangles); -- cgit v1.2.3