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

@ -285,16 +285,15 @@ bool PhysicsShapeData::preload( bool server, String &errorBuffer )
bool shapeError = false;
if (mShapeAsset.notNull())
if (getShape())
{
if (bool(getShape()) == false)
{
errorBuffer = String::ToString("PhysicsShapeData: Couldn't load shape \"%s\"", _getShapeAssetId());
return false;
}
if (!server && !getShape()->preloadMaterialList(getShape().getPath()) && NetConnection::filesWereDownloaded())
if (!server && !getShape()->preloadMaterialList(getShapeFile()) && NetConnection::filesWereDownloaded())
shapeError = true;
}
else
{
errorBuffer = String::ToString("PhysicsShapeData: Couldn't load shape \"%s\"", _getShapeAssetId());
return false;
}
// Prepare the shared physics collision shape.