From 0578ba6bba43dc90a9f302e20d68e655b4d84cf0 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sun, 7 Jan 2024 02:02:40 +0100 Subject: [PATCH] DataCache: rename studiodata_t::GetStudioCache() Rename studiodata_t::GetStudioCache() to studiodata_t::GetModelCache(). --- r5dev/datacache/mdlcache.cpp | 16 ++++++++-------- r5dev/datacache/mdlcache.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/r5dev/datacache/mdlcache.cpp b/r5dev/datacache/mdlcache.cpp index 751ed8ac..b7c5efe4 100644 --- a/r5dev/datacache/mdlcache.cpp +++ b/r5dev/datacache/mdlcache.cpp @@ -44,12 +44,12 @@ studiohdr_t* CMDLCache::FindMDL(CMDLCache* const cache, const MDLHandle_t handle return pStudioHdr; } - studiomodelcache_t* modelCache = studioData->GetStudioCache(); + studiomodelcache_t* modelCache = studioData->GetModelCache(); // Store error and empty fallback models. if (IS_VALID_DATACACHE_HANDLE(modelCache)) { - studiohdr_t* const studioHdr = studioData->GetStudioCache()->GetStudioHdr(); + studiohdr_t* const studioHdr = studioData->GetModelCache()->GetStudioHdr(); if (studioHdr) { @@ -72,7 +72,7 @@ studiohdr_t* CMDLCache::FindMDL(CMDLCache* const cache, const MDLHandle_t handle if (a3) { FindCachedMDL(cache, studioData, a3); - modelCache = studioData->modelCache; + modelCache = studioData->GetModelCache(); } studiohdr_t* const pStudioHdr = modelCache->GetStudioHdr(); @@ -83,7 +83,7 @@ studiohdr_t* CMDLCache::FindMDL(CMDLCache* const cache, const MDLHandle_t handle return FindUncachedMDL(cache, handle, studioData, a3); } - studioanimcache_t* const animCache = studioData->animCache; + studioanimcache_t* const animCache = studioData->GetAnimCache(); if (IS_VALID_DATACACHE_HANDLE(animCache)) { @@ -180,7 +180,7 @@ studiohdr_t* CMDLCache::FindUncachedMDL(CMDLCache* const cache, const MDLHandle_ else { FindCachedMDL(cache, pStudioData, a4); - studiomodelcache_t* const modelCache = pStudioData->GetStudioCache(); + studiomodelcache_t* const modelCache = pStudioData->GetModelCache(); if (modelCache) { @@ -226,7 +226,7 @@ studiomodelcache_t* CMDLCache::GetModelCache(const MDLHandle_t handle) if (!studioData) return nullptr; - studiomodelcache_t* const modelCache = studioData->GetStudioCache(); + studiomodelcache_t* const modelCache = studioData->GetModelCache(); return modelCache; } @@ -242,7 +242,7 @@ vcollide_t* CMDLCache::GetVCollide(CMDLCache* const cache, const MDLHandle_t han if (!IS_VALID_DATACACHE_HANDLE(modelCache)) { - Warning(eDLL_T::ENGINE, "Attempted to load vcollide on model \"%s\" with invalid studio data!\n", cache->GetModelName(handle)); + Warning(eDLL_T::ENGINE, "Attempted to load collision data on model \"%s\" with invalid studio data!\n", cache->GetModelName(handle)); return nullptr; } @@ -320,7 +320,7 @@ studiohwdata_t* CMDLCache::GetHardwareData(CMDLCache* const cache, const MDLHand } studioData = cache->GetStudioData(GetErrorModelHandle()); - modelCache = studioData->GetStudioCache(); + modelCache = studioData->GetModelCache(); } else { diff --git a/r5dev/datacache/mdlcache.h b/r5dev/datacache/mdlcache.h index b5f355df..310df4b2 100644 --- a/r5dev/datacache/mdlcache.h +++ b/r5dev/datacache/mdlcache.h @@ -183,7 +183,7 @@ struct studioanimcache_t // only models with type "mod_studio" have this data struct studiodata_t { - inline studiomodelcache_t* GetStudioCache() const { return modelCache; } + inline studiomodelcache_t* GetModelCache() const { return modelCache; } inline studioanimcache_t* GetAnimCache() const { return animCache; } inline CStudioHWDataRef* GetHardwareDataRef() const { return hardwareRef; }