try to load shapes during preload

it's half the point of the protocol
This commit is contained in:
AzaezelX 2025-07-06 19:51:55 -05:00
parent c138d838bb
commit e8ccb3443a
18 changed files with 63 additions and 71 deletions

View file

@ -274,21 +274,20 @@ bool DebrisData::preload(bool server, String &errorStr)
if( server ) return true;
if (mShapeAsset.notNull())
if (getShape())
{
if (!getShape())
{
errorStr = String::ToString("DebrisData::load: Couldn't load shape \"%s\"", _getShapeAssetId());
return false;
}
else
{
TSShapeInstance* pDummy = new TSShapeInstance(getShape(), !server);
delete pDummy;
if (!server && !getShape()->preloadMaterialList(getShape().getPath()) && NetConnection::filesWereDownloaded())
if (!server && !getShape()->preloadMaterialList(getShapeFile()) && NetConnection::filesWereDownloaded())
return false;
}
}
else
{
errorStr = String::ToString("DebrisData::load: Couldn't load shape \"%s\"", _getShapeAssetId());
return false;
}
return true;
}