mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
shapes are optional for projectiles. not mandatory.
and stop yelling in the console mid way through loading.
This commit is contained in:
parent
5dbcaf55c7
commit
4eae51992e
|
|
@ -368,7 +368,6 @@ U32 ShapeAsset::load()
|
|||
|
||||
if (!mShape)
|
||||
{
|
||||
Con::errorf("ShapeAsset::loadShape : failed to load shape file %s (%s)!", getAssetName(), mShapeFile);
|
||||
mLoadedState = BadFileReference;
|
||||
return mLoadedState; //if it failed to load, bail out
|
||||
}
|
||||
|
|
|
|||
|
|
@ -276,12 +276,10 @@ bool DebrisData::preload(bool server, String &errorStr)
|
|||
|
||||
if (getShape())
|
||||
{
|
||||
{
|
||||
TSShapeInstance* pDummy = new TSShapeInstance(getShape(), !server);
|
||||
delete pDummy;
|
||||
if (!server && !getShape()->preloadMaterialList(getShapeFile()) && NetConnection::filesWereDownloaded())
|
||||
return false;
|
||||
}
|
||||
TSShapeInstance* pDummy = new TSShapeInstance(getShape(), !server);
|
||||
delete pDummy;
|
||||
if (!server && !getShape()->preloadMaterialList(getShapeFile()) && NetConnection::filesWereDownloaded())
|
||||
return false;
|
||||
}
|
||||
else if (!mShapeAsset.isNull())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -905,7 +905,13 @@ bool ExplosionData::preload(bool server, String &errorStr)
|
|||
TSShapeInstance* pDummy = new TSShapeInstance(getExplosionShape(), !server);
|
||||
delete pDummy;
|
||||
|
||||
} else {
|
||||
}
|
||||
else if (mExplosionShapeAsset.notNull())
|
||||
{
|
||||
errorStr = String::ToString("ExplosionData::preload: Couldn't load shape \"%s\"", _getExplosionShapeAssetId());
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
explosionAnimation = -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -389,9 +389,9 @@ bool ProjectileData::preload(bool server, String &errorStr)
|
|||
TSShapeInstance* pDummy = new TSShapeInstance(getProjectileShape(), !server);
|
||||
delete pDummy;
|
||||
}
|
||||
else
|
||||
else if (mProjectileShapeAsset.notNull())
|
||||
{
|
||||
errorStr = String::ToString("ProjectileData::load: Couldn't load shape \"%s\"", _getProjectileShapeAssetId());
|
||||
errorStr = String::ToString("ProjectileData::preload: Couldn't load shape \"%s\"", _getProjectileShapeAssetId());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -499,6 +499,8 @@ bool ShapeBaseData::preload(bool server, String &errorStr)
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
Con::errorf("ShapeBaseData::preload -%s failed: %s", mShapeAsset.getAssetId(), ShapeAsset::getAssetErrstrn(assetStatus));
|
||||
}
|
||||
|
||||
if(!server)
|
||||
|
|
|
|||
|
|
@ -559,7 +559,7 @@ void TSShapeConstructor::setShapeAssetId(StringTableEntry assetId)
|
|||
mShapeAsset = mShapeAssetId;
|
||||
if (mShapeAsset.notNull())
|
||||
{
|
||||
Resource<TSShape> shape = mShapeAsset->getShapeResource();
|
||||
TSShape* shape = mShapeAsset->getShape();
|
||||
|
||||
if (shape)
|
||||
_onLoad(shape);
|
||||
|
|
|
|||
Loading…
Reference in a new issue