mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +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
|
|
@ -285,16 +285,15 @@ bool PhysicsShapeData::preload( bool server, String &errorBuffer )
|
|||
|
||||
bool shapeError = false;
|
||||
|
||||
if (mShapeAsset.notNull())
|
||||
if (getShape())
|
||||
{
|
||||
if (bool(getShape()) == false)
|
||||
{
|
||||
errorBuffer = String::ToString("PhysicsShapeData: Couldn't load shape \"%s\"", _getShapeAssetId());
|
||||
return false;
|
||||
}
|
||||
if (!server && !getShape()->preloadMaterialList(getShape().getPath()) && NetConnection::filesWereDownloaded())
|
||||
if (!server && !getShape()->preloadMaterialList(getShapeFile()) && NetConnection::filesWereDownloaded())
|
||||
shapeError = true;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
errorBuffer = String::ToString("PhysicsShapeData: Couldn't load shape \"%s\"", _getShapeAssetId());
|
||||
return false;
|
||||
}
|
||||
|
||||
// Prepare the shared physics collision shape.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue