Merge pull request #594 from LuisAntonRebollo/unit-tests-without-crash

Increased stability Torque3D: unit-tests running without a crash.
This commit is contained in:
Daniel Buckmaster 2014-06-16 10:57:04 +10:00
commit feec36731e
18 changed files with 113 additions and 19 deletions

View file

@ -550,6 +550,7 @@ S32 ProjectileData::scaleValue( S32 value, bool down )
//
Projectile::Projectile()
: mPhysicsWorld( NULL ),
mDataBlock( NULL ),
mCurrPosition( 0, 0, 0 ),
mCurrVelocity( 0, 0, 1 ),
mSourceObjectId( -1 ),
@ -697,6 +698,12 @@ bool Projectile::onAdd()
if(!Parent::onAdd())
return false;
if( !mDataBlock )
{
Con::errorf("Projectile::onAdd - Fail - Not datablock");
return false;
}
if (isServerObject())
{
ShapeBase* ptr;