File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Client/mods/deathmatch/logic Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -84,9 +84,6 @@ bool CClientModel::Deallocate()
84
84
if (!m_bAllocatedByUs)
85
85
return false ;
86
86
87
- if (m_pParentResource)
88
- m_pParentResource->GetResourceModelStreamer ()->FullyReleaseModel (m_iModelID);
89
-
90
87
SetParentResource (nullptr );
91
88
92
89
CModelInfo* pModelInfo = g_pGame->GetModelInfo (m_iModelID, true );
Original file line number Diff line number Diff line change @@ -49,6 +49,9 @@ bool CClientModelManager::Remove(const std::shared_ptr<CClientModel>& pModel)
49
49
int modelId = pModel->GetModelID ();
50
50
if (m_Models[modelId] != nullptr )
51
51
{
52
+ CResource* parentResource = m_Models[modelId]->GetParentResource ();
53
+ if (parentResource)
54
+ parentResource->GetResourceModelStreamer ()->FullyReleaseModel (modelId);
52
55
m_Models[modelId]->RestoreEntitiesUsingThisModel ();
53
56
m_Models[modelId] = nullptr ;
54
57
m_modelCount--;
You can’t perform that action at this time.
0 commit comments