From 49d8dff89ceb1529b8845d8217e5d4c9c9cab022 Mon Sep 17 00:00:00 2001 From: Alexey Date: Mon, 9 Dec 2024 22:51:15 +0300 Subject: [PATCH] [CKPE] FO4: - Fixed CTD moving with disable option bBSPointerHandleExtremly --- .../ReplaceBSPointerHandleAndManagerF4.cpp | 16 ++++++++++++++++ .../Version/build_version.txt | Bin 12 -> 12 bytes .../Version/resource_version2.h | Bin 2004 -> 2004 bytes 3 files changed, 16 insertions(+) diff --git a/Creation Kit Platform Extended Core/Patches/FO4/ReplaceBSPointerHandleAndManagerF4.cpp b/Creation Kit Platform Extended Core/Patches/FO4/ReplaceBSPointerHandleAndManagerF4.cpp index 27ff231..026c892 100644 --- a/Creation Kit Platform Extended Core/Patches/FO4/ReplaceBSPointerHandleAndManagerF4.cpp +++ b/Creation Kit Platform Extended Core/Patches/FO4/ReplaceBSPointerHandleAndManagerF4.cpp @@ -903,8 +903,24 @@ namespace CreationKitPlatformExtended _CONSOLE("CreationKitPlatformExtended::Experimental::BSPointerHandle: %llu patches applied in %llums", total_patches, duration); } else + { BSPointerHandleManagerCurrent::PointerHandleManagerCurrentId = 0; + { + ScopeRelocator textSection; + + auto addr = (uintptr_t)_RELDATA_RAV(0); + // Preparation, removal of all embedded pieces of code + lpRelocator->PatchNop(addr + 12, 0x7A); + lpRelocator->PatchMovFromRax(addr + 5, _RELDATA_RAV(1)); + } + + lpRelocator->DetourCall(_RELDATA_RAV(0), + (uintptr_t)&BSPointerHandleManager_Original::InitSDM); + lpRelocator->DetourCall(_RELDATA_RAV(2), + (uintptr_t)&BSPointerHandleManager_Original::KillSDM); + } + return true; } diff --git a/Creation Kit Platform Extended Core/Version/build_version.txt b/Creation Kit Platform Extended Core/Version/build_version.txt index f0a3f978b8fb5048484718c15648866a66277fcf..595dc727c05b379724138e9a204f586c851ec01b 100644 GIT binary patch literal 12 TcmezW&yvA_!IXiQfr|kE94Z2{ literal 12 TcmezW&yvA_!GwXAfr|kE93%p= diff --git a/Creation Kit Platform Extended Core/Version/resource_version2.h b/Creation Kit Platform Extended Core/Version/resource_version2.h index 4a6d33ec137e45721ab5e48ad8dd994fcf450604..53b4bf7c4294d94014d7be073c7fafc02b30e167 100644 GIT binary patch delta 26 icmcb@e}#X;BW6|;23`iP$&Ad>lOtHAHp{T=UlOtHAHp{T=U