Integrating up through commit 90f050496

This commit is contained in:
alexpete
2021-04-07 14:03:29 -07:00
parent 8f2ed080a9
commit c2cbd430fe
2694 changed files with 285622 additions and 176874 deletions
+31 -28
View File
@@ -281,46 +281,49 @@ void CObjManager::PreloadLevelObjects()
//////////////////////////////////////////////////////////////////////////
// Request objects loading from Streaming System.
if (const char* pCgfName = pResList->GetFirst())
if (pResList)
{
while (pCgfName)
if (const char* pCgfName = pResList->GetFirst())
{
if (strstr(pCgfName, ".cgf"))
while (pCgfName)
{
const char* sLodName = strstr(pCgfName, "_lod");
if (sLodName && (sLodName[4] >= '0' && sLodName[4] <= '9'))
if (strstr(pCgfName, ".cgf"))
{
// Ignore Lod files.
pCgfName = pResList->GetNext();
continue;
}
cgfFilename = pCgfName;
if (bVerboseLogging)
{
CryLog("%s", cgfFilename.c_str());
}
IStatObj* pStatObj = GetObjManager()->LoadStatObjUnsafeManualRef(cgfFilename.c_str(), NULL, 0, true, 0);
if (pStatObj)
{
if (pStatObj->IsMeshStrippedCGF())
const char* sLodName = strstr(pCgfName, "_lod");
if (sLodName && (sLodName[4] >= '0' && sLodName[4] <= '9'))
{
nInLevelCacheCount++;
// Ignore Lod files.
pCgfName = pResList->GetNext();
continue;
}
cgfFilename = pCgfName;
if (bVerboseLogging)
{
CryLog("%s", cgfFilename.c_str());
}
IStatObj* pStatObj = GetObjManager()->LoadStatObjUnsafeManualRef(cgfFilename.c_str(), NULL, 0, true, 0);
if (pStatObj)
{
if (pStatObj->IsMeshStrippedCGF())
{
nInLevelCacheCount++;
}
}
// cgfStreamer.StartStreaming(cgfFilename.c_str());
nCgfCounter++;
// This loop can take a few seconds, so we should refresh the loading screen and call the loading tick functions to
// ensure that no big gaps in coverage occur.
SYNCHRONOUS_LOADING_TICK();
}
//cgfStreamer.StartStreaming(cgfFilename.c_str());
nCgfCounter++;
//This loop can take a few seconds, so we should refresh the loading screen and call the loading tick functions to ensure that no big gaps in coverage occur.
SYNCHRONOUS_LOADING_TICK();
pCgfName = pResList->GetNext();
}
pCgfName = pResList->GetNext();
}
}
// PrintMessage("Finished requesting level CGF's: %d objects in %.1f sec", nCgfCounter, GetCurAsyncTimeSec()-fStartTime);
// Continue updating streaming system until all CGF's are loaded