Skip to content

Commit

Permalink
[CKPE]
Browse files Browse the repository at this point in the history
FO4:
- Fixed CTD moving with disable option bBSPointerHandleExtremly
  • Loading branch information
Perchik71 committed Dec 9, 2024
1 parent 4a6eae5 commit 49d8dff
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Binary file modified Creation Kit Platform Extended Core/Version/build_version.txt
Binary file not shown.
Binary file modified Creation Kit Platform Extended Core/Version/resource_version2.h
Binary file not shown.

0 comments on commit 49d8dff

Please sign in to comment.