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()
8484 if (!m_bAllocatedByUs)
8585 return false ;
8686
87- if (m_pParentResource)
88- m_pParentResource->GetResourceModelStreamer ()->FullyReleaseModel (m_iModelID);
89-
9087 SetParentResource (nullptr );
9188
9289 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)
4949 int modelId = pModel->GetModelID ();
5050 if (m_Models[modelId] != nullptr )
5151 {
52+ CResource* parentResource = m_Models[modelId]->GetParentResource ();
53+ if (parentResource)
54+ parentResource->GetResourceModelStreamer ()->FullyReleaseModel (modelId);
5255 m_Models[modelId]->RestoreEntitiesUsingThisModel ();
5356 m_Models[modelId] = nullptr ;
5457 m_modelCount--;
You can’t perform that action at this time.
0 commit comments