From 9a69c9d5c6e32be0e9c58af0deaa3b744e700ea5 Mon Sep 17 00:00:00 2001 From: Gray <84999745+Milxnor@users.noreply.github.com> Date: Sat, 19 Jul 2025 17:34:55 -0400 Subject: [PATCH] fix nmt swpa --- Project Reboot 3.0/Array.h | 7 ++++++- Project Reboot 3.0/FortPickup.h | 5 +---- Project Reboot 3.0/NetDriver.cpp | 4 ++-- Project Reboot 3.0/addresses.h | 1 - Project Reboot 3.0/finder.cpp | 2 +- Project Reboot 3.0/finder.h | 2 ++ 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Project Reboot 3.0/Array.h b/Project Reboot 3.0/Array.h index 5bd267f..4def731 100644 --- a/Project Reboot 3.0/Array.h +++ b/Project Reboot 3.0/Array.h @@ -9,6 +9,11 @@ struct FMemory { static inline void* (*Realloc)(void* Original, SIZE_T Count, uint32_t Alignment /* = DEFAULT_ALIGNMENT */); + + static void Free(void* Address) + { + Realloc(Address, 0, 0); + } }; template @@ -330,7 +335,7 @@ public: { if (true) { - static void (*FreeOriginal)(void* Original) = decltype(FreeOriginal)(Addresses::Free); + static void (*FreeOriginal)(void* Original) = decltype(FreeOriginal)(0); if (FreeOriginal) FreeOriginal(Data); diff --git a/Project Reboot 3.0/FortPickup.h b/Project Reboot 3.0/FortPickup.h index 207a919..22b1baf 100644 --- a/Project Reboot 3.0/FortPickup.h +++ b/Project Reboot 3.0/FortPickup.h @@ -88,10 +88,7 @@ struct PickupCreateData if (bUseFMemoryRealloc) { - static void (*FreeOriginal)(void* Original) = decltype(FreeOriginal)(Addresses::Free); - - if (FreeOriginal) - FreeOriginal(ItemEntry); + FMemory::Free(ItemEntry); } else { diff --git a/Project Reboot 3.0/NetDriver.cpp b/Project Reboot 3.0/NetDriver.cpp index c6c9612..009d7b5 100644 --- a/Project Reboot 3.0/NetDriver.cpp +++ b/Project Reboot 3.0/NetDriver.cpp @@ -837,8 +837,8 @@ int32 UNetDriver::ServerReplicateActors() if (!Channel) { - if (!Offsets::IsNetRelevantFor - && Actor->IsA(APlayerController::StaticClass()) && Actor != Connection->GetPlayerController()) // isnetrelevantfor should handle this iirc + if (// !Offsets::IsNetRelevantFor && + Actor->IsA(APlayerController::StaticClass()) && Actor != Connection->GetPlayerController()) // isnetrelevantfor should handle this iirc continue; if (bLevelInitializedForActor) diff --git a/Project Reboot 3.0/addresses.h b/Project Reboot 3.0/addresses.h index c148979..38881c9 100644 --- a/Project Reboot 3.0/addresses.h +++ b/Project Reboot 3.0/addresses.h @@ -54,7 +54,6 @@ namespace Addresses extern inline uint64 RemoveFromAlivePlayers = 0; extern inline uint64 ActorChannelClose = 0; extern inline uint64 FrameStepExplicitProperty = 0; - extern inline uint64 Free = 0; extern inline uint64 ClearAbility = 0; extern inline uint64 ApplyGadgetData = 0; extern inline uint64 RemoveGadgetData = 0; diff --git a/Project Reboot 3.0/finder.cpp b/Project Reboot 3.0/finder.cpp index 07359c0..3d1f73c 100644 --- a/Project Reboot 3.0/finder.cpp +++ b/Project Reboot 3.0/finder.cpp @@ -318,7 +318,7 @@ uint64 ApplyGameSessionPatch() return 0; } - LOG_INFO(LogDev, "ByteToPatch: 0x{:x}", __int64(ByteToPatch) - __int64(GetModuleHandleW(0))); + LOG_INFO(LogDev, "[ApplyGameSessionPatch] ByteToPatch: 0x{:x}", __int64(ByteToPatch) - __int64(GetModuleHandleW(0))); DWORD dwProtection; VirtualProtect((PVOID)ByteToPatch, 1, PAGE_EXECUTE_READWRITE, &dwProtection); diff --git a/Project Reboot 3.0/finder.h b/Project Reboot 3.0/finder.h index c9994f3..cbbfaf7 100644 --- a/Project Reboot 3.0/finder.h +++ b/Project Reboot 3.0/finder.h @@ -1203,6 +1203,8 @@ static inline uint64 FindGetInterfaceAddress() static inline uint64 FindCollectGarbage() { + if (Engine_Version == 416) + return Memcury::Scanner::FindPattern("48 8B C4 48 89 58 08 88 50 10 55 56 57 41 54 41 55 41 56 41 57 48 8D 68 A1").Get(); // 1.9 // return 0; auto Addr = Memcury::Scanner::FindStringRef(L"STAT_CollectGarbageInternal");