Corrected handling for invalid shapes using fallback shape on TSStatics

This commit is contained in:
JeffR 2026-05-31 16:22:12 -05:00
parent b338510921
commit d53892fb80

View file

@ -405,22 +405,23 @@ bool TSStatic::_createShape()
mAmbientThread = NULL;
//mShape = NULL;
if (mShapeAssetRef.assetId == StringTable->EmptyString())
return false;
Resource<TSShape> shape;
if (!mShapeAssetRef.assetPtr.isValid())
if (mShapeAssetRef.assetPtr.isNull())
{
shape = ShapeAsset::smNoShapeAssetFallbackAssetPtr->getShapeResource();
}
else
{
shape = mShapeAssetRef.assetPtr->getShapeResource();
if (shape)
{
if (isClientObject() &&
!mShapeAssetRef.assetPtr->preloadMaterialList() &&
NetConnection::filesWereDownloaded())
return false;
}
if (shape)
{
mObjBox = shape->mBounds;
resetWorldBox();