mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 00:54:54 +00:00
preload materials for shapebasedatas and debris
This commit is contained in:
parent
e7403197c7
commit
11a29ef97a
2 changed files with 5 additions and 0 deletions
|
|
@ -285,6 +285,8 @@ bool DebrisData::preload(bool server, String &errorStr)
|
||||||
{
|
{
|
||||||
TSShapeInstance* pDummy = new TSShapeInstance(mShape, !server);
|
TSShapeInstance* pDummy = new TSShapeInstance(mShape, !server);
|
||||||
delete pDummy;
|
delete pDummy;
|
||||||
|
if (!server && !mShape->preloadMaterialList(mShape.getPath()) && NetConnection::filesWereDownloaded())
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -347,6 +347,9 @@ bool ShapeBaseData::preload(bool server, String &errorStr)
|
||||||
S32 i;
|
S32 i;
|
||||||
if (ShapeAsset::getAssetErrCode(mShapeAsset) != ShapeAsset::Failed && ShapeAsset::getAssetErrCode(mShapeAsset) != ShapeAsset::BadFileReference)
|
if (ShapeAsset::getAssetErrCode(mShapeAsset) != ShapeAsset::Failed && ShapeAsset::getAssetErrCode(mShapeAsset) != ShapeAsset::BadFileReference)
|
||||||
{
|
{
|
||||||
|
if (!server && !mShape->preloadMaterialList(mShape.getPath()) && NetConnection::filesWereDownloaded())
|
||||||
|
shapeError = true;
|
||||||
|
|
||||||
if(computeCRC)
|
if(computeCRC)
|
||||||
{
|
{
|
||||||
Con::printf("Validation required for shape asset: %s", mShapeAsset.getAssetId());
|
Con::printf("Validation required for shape asset: %s", mShapeAsset.getAssetId());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue