mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
CMDLCache: light cleanup
This commit is contained in:
parent
2afec89c2f
commit
ca423c0dcf
@ -285,11 +285,11 @@ studiohwdata_t* CMDLCache::GetHardwareData(CMDLCache* cache, MDLHandle_t handle)
|
||||
|
||||
void* pAnimData = (void*)*((_QWORD*)dataCache + 1);
|
||||
|
||||
AcquireSRWLockExclusive(reinterpret_cast<PSRWLOCK>(&*g_pMDLLock));
|
||||
AcquireSRWLockExclusive(g_pMDLLock);
|
||||
#if !defined (GAMEDLL_S0) && !defined (GAMEDLL_S1) && !defined (GAMEDLL_S2)
|
||||
v_CStudioHWDataRef__SetFlags(reinterpret_cast<CStudioHWDataRef*>(pAnimData), 1i64); // !!! DECLARED INLINE IN < S3 !!!
|
||||
#endif
|
||||
ReleaseSRWLockExclusive(reinterpret_cast<PSRWLOCK>(&*g_pMDLLock));
|
||||
ReleaseSRWLockExclusive(g_pMDLLock);
|
||||
}
|
||||
if ((pStudioData->m_nFlags & STUDIODATA_FLAGS_STUDIOMESH_LOADED))
|
||||
return &pStudioData->m_pHardwareRef->m_HardwareData;
|
||||
|
@ -127,7 +127,7 @@ inline CMemory p_CStudioHWDataRef__SetFlags; // Probably incorrect.
|
||||
inline bool(*v_CStudioHWDataRef__SetFlags)(CStudioHWDataRef* ref, int64_t flags);
|
||||
#endif
|
||||
inline CMDLCache* g_pMDLCache = nullptr;
|
||||
inline PSRWLOCK* g_pMDLLock = nullptr; // Possibly a member? research required.
|
||||
inline PSRWLOCK g_pMDLLock = nullptr; // Possibly a member? research required.
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class VMDLCache : public IDetour
|
||||
@ -189,7 +189,7 @@ class VMDLCache : public IDetour
|
||||
g_pMDLCache = g_GameDll.FindPatternSIMD("48 83 EC 28 48 8B 05 ?? ?? ?? ?? 48 8D 0D ?? ?? ?? ?? 48 85 C0 48 0F 45 C8 FF 05 ?? ?? ?? ?? 48 83 3D ?? ?? ?? ?? ?? 48 8D 05 ?? ?? ?? ??")
|
||||
.FindPatternSelf("48 8D 05").ResolveRelativeAddressSelf(0x3, 0x7).RCast<CMDLCache*>();
|
||||
|
||||
g_pMDLLock = p_CMDLCache__GetHardwareData.Offset(0x35).FindPatternSelf("48 8D 0D").ResolveRelativeAddressSelf(0x3, 0x7).RCast<PSRWLOCK*>();
|
||||
g_pMDLLock = p_CMDLCache__GetHardwareData.Offset(0x35).FindPatternSelf("48 8D 0D").ResolveRelativeAddressSelf(0x3, 0x7).RCast<PSRWLOCK>();
|
||||
}
|
||||
virtual void GetCon(void) const { }
|
||||
virtual void Attach(void) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user