Merge pull request #1515 from Azaezel/alpha41/preLoad

try to load shapes during preload
This commit is contained in:
Brian Roberts 2025-07-06 22:35:33 -05:00 committed by GitHub
commit 5c9e34a90c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 63 additions and 71 deletions

View file

@ -615,18 +615,18 @@ bool PlayerData::preload(bool server, String &errorStr)
return false;
}
if (!server && !getShapeFP(i)->preloadMaterialList(getShapeFP(i).getPath()) && NetConnection::filesWereDownloaded())
if (!server && !getShapeFP(i)->preloadMaterialList(getShapeFPFile(i)) && NetConnection::filesWereDownloaded())
shapeError = true;
if (computeCRC)
{
Con::printf("Validation required for mounted image %d shape: %s", i, _getShapeFPAssetId(i));
Torque::FS::FileNodeRef fileRef = Torque::FS::GetFileNode(getShapeFP(i).getPath());
Torque::FS::FileNodeRef fileRef = Torque::FS::GetFileNode(getShapeFPFile(i));
if (!fileRef)
{
errorStr = String::ToString("PlayerData: Mounted image %d loading failed, shape \"%s\" is not found.", i, getShapeFP(i).getPath().getFullPath().c_str());
errorStr = String::ToString("PlayerData: Mounted image %d loading failed, shape \"%s\" is not found.", i, getShapeFPFile(i));
return false;
}