From 17c5d143909866dc18677ac921b0fcf659929579 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Fri, 6 May 2022 13:21:42 +0200 Subject: [PATCH] Update mdlcache.cpp --- r5dev/datacache/mdlcache.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/r5dev/datacache/mdlcache.cpp b/r5dev/datacache/mdlcache.cpp index b9ef7bd1..0830bb13 100644 --- a/r5dev/datacache/mdlcache.cpp +++ b/r5dev/datacache/mdlcache.cpp @@ -26,12 +26,10 @@ //----------------------------------------------------------------------------- studiohdr_t* CMDLCache::FindMDL(CMDLCache* cache, MDLHandle_t handle, void* a3) { - studiodata_t* pStudioData; // rbx - void* pMDLCache; // rax studiohdr_t* pStudioHdr; // rax EnterCriticalSection(reinterpret_cast(&*m_MDLMutex)); - pStudioData = m_MDLDict->Find(handle); + studiodata_t* pStudioData = m_MDLDict->Find(handle); LeaveCriticalSection(reinterpret_cast(&*m_MDLMutex)); if (!g_pMDLFallback->m_hErrorMDL || !g_pMDLFallback->m_hEmptyMDL) @@ -71,7 +69,7 @@ studiohdr_t* CMDLCache::FindMDL(CMDLCache* cache, MDLHandle_t handle, void* a3) int nFlags = STUDIOHDR_FLAGS_NEEDS_DEFERRED_ADDITIVE | STUDIOHDR_FLAGS_OBSOLETE; if ((pStudioData->m_nFlags & nFlags)) { - pMDLCache = *reinterpret_cast(pStudioData); + void* pMDLCache = *reinterpret_cast(pStudioData); if (pStudioData->m_MDLCache) { if (a3) @@ -138,7 +136,6 @@ studiohdr_t* CMDLCache::FindUncachedMDL(CMDLCache* cache, MDLHandle_t handle, st if (IsBadReadPtrV2(reinterpret_cast(szModelName))) { pStudioHdr = GetErrorModel(); - if (!IsKnownBadModel(handle)) { if (!pStudioHdr)