From 9994491551ebba164fda47186ea1073f0c3bc879 Mon Sep 17 00:00:00 2001 From: Marvin D <41352111+IcePixelx@users.noreply.github.com> Date: Tue, 20 Dec 2022 01:03:59 +0100 Subject: [PATCH] RTech_RegisterAsset --- r5dev/public/utility/sigcache.h | 2 +- r5dev/rtech/rtech_utils.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/r5dev/public/utility/sigcache.h b/r5dev/public/utility/sigcache.h index f2bbb49e..adeff633 100644 --- a/r5dev/public/utility/sigcache.h +++ b/r5dev/public/utility/sigcache.h @@ -7,7 +7,7 @@ #define SIGDB_DICT_SIZE 20 #define SIGDB_MAJOR_VERSION 0x1 // Increment when library changes are made. -#define SIGDB_MINOR_VERSION 0x2 // Increment when SDK updates are released. +#define SIGDB_MINOR_VERSION 0x3 // Increment when SDK updates are released. #ifdef DEDICATED #define SIGDB_FILE "cfg\\server\\startup.bin" diff --git a/r5dev/rtech/rtech_utils.h b/r5dev/rtech/rtech_utils.h index 6b788687..5e72eb58 100644 --- a/r5dev/rtech/rtech_utils.h +++ b/r5dev/rtech/rtech_utils.h @@ -320,6 +320,9 @@ inline auto RTech_FindFreeSlotInFiles = p_RTech_FindFreeSlotInFiles.RCast(); +inline CMemory p_RTech_RegisterAsset; +inline auto RTech_RegisterAsset = p_RTech_RegisterAsset.RCast(); + #ifdef GAMEDLL_S3 inline CMemory p_Pak_ProcessGuidRelationsForAsset; inline auto RTech_Pak_ProcessGuidRelationsForAsset = p_Pak_ProcessGuidRelationsForAsset.RCast(); @@ -417,6 +420,9 @@ class VPakFile : public IDetour p_RTech_OpenFile = g_GameDll.FindPatternSIMD("E8 ?? ?? ?? ?? 89 85 08 01 ?? ??").FollowNearCallSelf(); RTech_OpenFile = p_RTech_OpenFile.RCast(); /*E8 ? ? ? ? 89 85 08 01 00 00*/ + p_RTech_RegisterAsset = g_GameDll.FindPatternSIMD("4D 89 42 08").FindPatternSelf("48 89 6C", CMemory::Direction::UP); + RTech_RegisterAsset = p_RTech_RegisterAsset.RCast(); /*4D 89 42 08*/ + #ifdef GAMEDLL_S3 p_Pak_ProcessGuidRelationsForAsset = g_GameDll.FindPatternSIMD("E8 ?? ?? ?? ?? 48 8B 86 ?? ?? ?? ?? 42 8B 0C B0").FollowNearCallSelf(); RTech_Pak_ProcessGuidRelationsForAsset = p_Pak_ProcessGuidRelationsForAsset.RCast(); /*E8 ? ? ? ? 48 8B 86 ? ? ? ? 42 8B 0C B0*/