mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Increased stability Torqu3D: unit-tests running without a crash. See the console.log after ran unitTest_runTests( "", true ). @signmotion
This commit is contained in:
parent
29d7fe310d
commit
18ba0646c0
18 changed files with 113 additions and 19 deletions
|
|
@ -771,6 +771,7 @@ bool ExplosionData::preload(bool server, String &errorStr)
|
|||
//--------------------------------------
|
||||
//
|
||||
Explosion::Explosion()
|
||||
: mDataBlock( NULL )
|
||||
{
|
||||
mTypeMask |= ExplosionObjectType | LightObjectType;
|
||||
|
||||
|
|
@ -831,6 +832,12 @@ bool Explosion::onAdd()
|
|||
if ( !conn || !Parent::onAdd() )
|
||||
return false;
|
||||
|
||||
if( !mDataBlock )
|
||||
{
|
||||
Con::errorf("Explosion::onAdd - Fail - No datablok");
|
||||
return false;
|
||||
}
|
||||
|
||||
mDelayMS = mDataBlock->delayMS + sgRandom.randI( -mDataBlock->delayVariance, mDataBlock->delayVariance );
|
||||
mEndingMS = mDataBlock->lifetimeMS + sgRandom.randI( -mDataBlock->lifetimeVariance, mDataBlock->lifetimeVariance );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue