steam networking

This commit is contained in:
2026-03-02 17:31:49 +02:00
parent 3db160b49e
commit 0dc8f1b36f
14 changed files with 99 additions and 7 deletions

View File

@@ -64,7 +64,7 @@ uint32_t CAssetManager::LoadModel( const char *szName )
u++;
continue;
}
if (m->m_szName == szName)
if (m->m_szParentName == szName)
{
m_modelUsages[uFoundIndex]++;
return u;
@@ -81,6 +81,8 @@ uint32_t CAssetManager::LoadModel( const char *szName )
IFileHandle *pHandle = filesystem->Open(szName, FILEMODE_READ);
CUtlString szProperties = filesystem->ReadString(pHandle);
IJSONValue *pRoot = JSONManager()->ReadString(szProperties);
filesystem->Close(pHandle);
IJSONObject *pMainObject;
CUtlString szMeshData;
IVertexBuffer *pVertices;
@@ -97,10 +99,13 @@ uint32_t CAssetManager::LoadModel( const char *szName )
}
IJSONValue *pMesh = pMainObject->GetValue("mesh");
IJSONValue *pMaterial = pMainObject->GetValue("material");
CUtlString szMesh = pMesh->GetStringValue();
CUtlString szMaterial = pMaterial->GetStringValue();
m_models[uFoundIndex] = LoadModelFromParams(szMesh, szMaterial);
m_models[uFoundIndex]->m_szParentName = szName;
m_modelUsages[uFoundIndex]++;
return uFoundIndex;