mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-06-06 21:46:39 +00:00
Corrected handling for invalid shapes using fallback shape on TSStatics
This commit is contained in:
parent
b338510921
commit
d53892fb80
1 changed files with 7 additions and 6 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue