steam networking
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user