mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-23 16:43:50 +00:00
Corrects preload logic for projectiles to only fail if shape is specified, but failed to load
Corrects logic in Project Importer for if cubemapData is defined in material scripts, it can process them correctly.
This commit is contained in:
parent
47f2810e34
commit
0dddeeb6dd
2 changed files with 16 additions and 12 deletions
|
|
@ -377,18 +377,22 @@ bool ProjectileData::preload(bool server, String &errorStr)
|
|||
Con::errorf(ConsoleLogEntry::General, "ProjectileData::preload: Invalid packet, bad datablockid(lightDesc): %d", lightDescId);
|
||||
}
|
||||
|
||||
if (!mProjectileShape)
|
||||
if (mProjectileShapeAssetId != StringTable->EmptyString())
|
||||
{
|
||||
errorStr = String::ToString("ProjectileData::load: Couldn't load shape \"%s\"", mProjectileShapeAssetId);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
activateSeq = mProjectileShape->findSequence("activate");
|
||||
maintainSeq = mProjectileShape->findSequence("maintain");
|
||||
//If we've got a shapeAsset assigned for our projectile, but we failed to load the shape data itself, report the error
|
||||
if (!mProjectileShape)
|
||||
{
|
||||
errorStr = String::ToString("ProjectileData::load: Couldn't load shape \"%s\"", mProjectileShapeAssetId);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
activateSeq = mProjectileShape->findSequence("activate");
|
||||
maintainSeq = mProjectileShape->findSequence("maintain");
|
||||
|
||||
TSShapeInstance* pDummy = new TSShapeInstance(mProjectileShape, !server);
|
||||
delete pDummy;
|
||||
TSShapeInstance* pDummy = new TSShapeInstance(mProjectileShape, !server);
|
||||
delete pDummy;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue