mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
RTech: search for pattern again
The extra runtime overhead this creates is negligible as all patterns will be searched once, and have their results being cached off. Due to a planned future change, we can't extern it anymore.
This commit is contained in:
parent
49d1f6f1fe
commit
48e79faffa
@ -87,8 +87,7 @@ class V_AsyncIO : public IDetour
|
|||||||
}
|
}
|
||||||
virtual void GetVar(void) const
|
virtual void GetVar(void) const
|
||||||
{
|
{
|
||||||
extern void(*v_StreamDB_Init)(const char* const pszLevelName);
|
const CMemory streamDbBase = g_GameDll.FindPatternSIMD("48 89 5C 24 ?? 48 89 6C 24 ?? 48 89 74 24 ?? 48 89 7C 24 ?? 41 54 41 56 41 57 48 83 EC 40 48 8B E9");
|
||||||
const CMemory streamDbBase(v_StreamDB_Init);
|
|
||||||
|
|
||||||
g_pAsyncFileSlots = streamDbBase.Offset(0x70).FindPatternSelf("4C 8D", CMemory::Direction::DOWN, 512, 1).ResolveRelativeAddress(0x3, 0x7).RCast<AsyncHandleTracker_s*>();
|
g_pAsyncFileSlots = streamDbBase.Offset(0x70).FindPatternSelf("4C 8D", CMemory::Direction::DOWN, 512, 1).ResolveRelativeAddress(0x3, 0x7).RCast<AsyncHandleTracker_s*>();
|
||||||
g_pAsyncFileSlotMgr = streamDbBase.Offset(0x70).FindPatternSelf("48 8D 0D", CMemory::Direction::DOWN, 512, 2).ResolveRelativeAddress(0x3, 0x7).RCast<RHashMap_MT*>();
|
g_pAsyncFileSlotMgr = streamDbBase.Offset(0x70).FindPatternSelf("48 8D 0D", CMemory::Direction::DOWN, 512, 2).ResolveRelativeAddress(0x3, 0x7).RCast<RHashMap_MT*>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user