mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 14:00:39 +00:00
try to load shapes during preload
it's half the point of the protocol
This commit is contained in:
parent
c138d838bb
commit
e8ccb3443a
18 changed files with 63 additions and 71 deletions
|
|
@ -274,21 +274,20 @@ bool DebrisData::preload(bool server, String &errorStr)
|
|||
|
||||
if( server ) return true;
|
||||
|
||||
if (mShapeAsset.notNull())
|
||||
if (getShape())
|
||||
{
|
||||
if (!getShape())
|
||||
{
|
||||
errorStr = String::ToString("DebrisData::load: Couldn't load shape \"%s\"", _getShapeAssetId());
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
TSShapeInstance* pDummy = new TSShapeInstance(getShape(), !server);
|
||||
delete pDummy;
|
||||
if (!server && !getShape()->preloadMaterialList(getShape().getPath()) && NetConnection::filesWereDownloaded())
|
||||
if (!server && !getShape()->preloadMaterialList(getShapeFile()) && NetConnection::filesWereDownloaded())
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errorStr = String::ToString("DebrisData::load: Couldn't load shape \"%s\"", _getShapeAssetId());
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue