DataCache: rename studiodata_t::GetStudioCache()

Rename studiodata_t::GetStudioCache() to studiodata_t::GetModelCache().
This commit is contained in:
Kawe Mazidjatari 2024-01-07 02:02:40 +01:00
parent 686e65cc70
commit 7c4d080406
2 changed files with 9 additions and 9 deletions

View File

@ -44,12 +44,12 @@ studiohdr_t* CMDLCache::FindMDL(CMDLCache* const cache, const MDLHandle_t handle
return pStudioHdr; return pStudioHdr;
} }
studiomodelcache_t* modelCache = studioData->GetStudioCache(); studiomodelcache_t* modelCache = studioData->GetModelCache();
// Store error and empty fallback models. // Store error and empty fallback models.
if (IS_VALID_DATACACHE_HANDLE(modelCache)) if (IS_VALID_DATACACHE_HANDLE(modelCache))
{ {
studiohdr_t* const studioHdr = studioData->GetStudioCache()->GetStudioHdr(); studiohdr_t* const studioHdr = studioData->GetModelCache()->GetStudioHdr();
if (studioHdr) if (studioHdr)
{ {
@ -72,7 +72,7 @@ studiohdr_t* CMDLCache::FindMDL(CMDLCache* const cache, const MDLHandle_t handle
if (a3) if (a3)
{ {
FindCachedMDL(cache, studioData, a3); FindCachedMDL(cache, studioData, a3);
modelCache = studioData->modelCache; modelCache = studioData->GetModelCache();
} }
studiohdr_t* const pStudioHdr = modelCache->GetStudioHdr(); 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); return FindUncachedMDL(cache, handle, studioData, a3);
} }
studioanimcache_t* const animCache = studioData->animCache; studioanimcache_t* const animCache = studioData->GetAnimCache();
if (IS_VALID_DATACACHE_HANDLE(animCache)) if (IS_VALID_DATACACHE_HANDLE(animCache))
{ {
@ -180,7 +180,7 @@ studiohdr_t* CMDLCache::FindUncachedMDL(CMDLCache* const cache, const MDLHandle_
else else
{ {
FindCachedMDL(cache, pStudioData, a4); FindCachedMDL(cache, pStudioData, a4);
studiomodelcache_t* const modelCache = pStudioData->GetStudioCache(); studiomodelcache_t* const modelCache = pStudioData->GetModelCache();
if (modelCache) if (modelCache)
{ {
@ -226,7 +226,7 @@ studiomodelcache_t* CMDLCache::GetModelCache(const MDLHandle_t handle)
if (!studioData) if (!studioData)
return nullptr; return nullptr;
studiomodelcache_t* const modelCache = studioData->GetStudioCache(); studiomodelcache_t* const modelCache = studioData->GetModelCache();
return modelCache; return modelCache;
} }
@ -242,7 +242,7 @@ vcollide_t* CMDLCache::GetVCollide(CMDLCache* const cache, const MDLHandle_t han
if (!IS_VALID_DATACACHE_HANDLE(modelCache)) 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; return nullptr;
} }
@ -320,7 +320,7 @@ studiohwdata_t* CMDLCache::GetHardwareData(CMDLCache* const cache, const MDLHand
} }
studioData = cache->GetStudioData(GetErrorModelHandle()); studioData = cache->GetStudioData(GetErrorModelHandle());
modelCache = studioData->GetStudioCache(); modelCache = studioData->GetModelCache();
} }
else else
{ {

View File

@ -183,7 +183,7 @@ struct studioanimcache_t
// only models with type "mod_studio" have this data // only models with type "mod_studio" have this data
struct studiodata_t 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 studioanimcache_t* GetAnimCache() const { return animCache; }
inline CStudioHWDataRef* GetHardwareDataRef() const { return hardwareRef; } inline CStudioHWDataRef* GetHardwareDataRef() const { return hardwareRef; }