mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-28 19:13:47 +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
|
|
@ -381,22 +381,18 @@ bool ProjectileData::preload(bool server, String &errorStr)
|
|||
Con::errorf(ConsoleLogEntry::General, "ProjectileData::preload: Invalid packet, bad datablockid(lightDesc): %d", lightDescId);
|
||||
}
|
||||
|
||||
if (mProjectileShapeAsset.notNull())
|
||||
if (getProjectileShape())
|
||||
{
|
||||
//If we've got a shapeAsset assigned for our projectile, but we failed to load the shape data itself, report the error
|
||||
if (!getProjectileShape())
|
||||
{
|
||||
errorStr = String::ToString("ProjectileData::load: Couldn't load shape \"%s\"", _getProjectileShapeAssetId());
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
activateSeq = getProjectileShape()->findSequence("activate");
|
||||
maintainSeq = getProjectileShape()->findSequence("maintain");
|
||||
activateSeq = getProjectileShape()->findSequence("activate");
|
||||
maintainSeq = getProjectileShape()->findSequence("maintain");
|
||||
|
||||
TSShapeInstance* pDummy = new TSShapeInstance(getProjectileShape(), !server);
|
||||
delete pDummy;
|
||||
}
|
||||
TSShapeInstance* pDummy = new TSShapeInstance(getProjectileShape(), !server);
|
||||
delete pDummy;
|
||||
}
|
||||
else
|
||||
{
|
||||
errorStr = String::ToString("ProjectileData::load: Couldn't load shape \"%s\"", _getProjectileShapeAssetId());
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue