mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 07:34:45 +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;
|
mAmbientThread = NULL;
|
||||||
//mShape = NULL;
|
//mShape = NULL;
|
||||||
|
|
||||||
if (mShapeAssetRef.assetId == StringTable->EmptyString())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
Resource<TSShape> shape;
|
Resource<TSShape> shape;
|
||||||
if (!mShapeAssetRef.assetPtr.isValid())
|
if (mShapeAssetRef.assetPtr.isNull())
|
||||||
|
{
|
||||||
shape = ShapeAsset::smNoShapeAssetFallbackAssetPtr->getShapeResource();
|
shape = ShapeAsset::smNoShapeAssetFallbackAssetPtr->getShapeResource();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
shape = mShapeAssetRef.assetPtr->getShapeResource();
|
shape = mShapeAssetRef.assetPtr->getShapeResource();
|
||||||
|
|
||||||
if (shape)
|
|
||||||
{
|
|
||||||
if (isClientObject() &&
|
if (isClientObject() &&
|
||||||
!mShapeAssetRef.assetPtr->preloadMaterialList() &&
|
!mShapeAssetRef.assetPtr->preloadMaterialList() &&
|
||||||
NetConnection::filesWereDownloaded())
|
NetConnection::filesWereDownloaded())
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (shape)
|
||||||
|
{
|
||||||
mObjBox = shape->mBounds;
|
mObjBox = shape->mBounds;
|
||||||
resetWorldBox();
|
resetWorldBox();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue