mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-28 11:03:49 +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
|
|
@ -311,7 +311,8 @@ PhysicsDebris* PhysicsDebris::create( PhysicsDebrisData *datablock,
|
|||
}
|
||||
|
||||
PhysicsDebris::PhysicsDebris()
|
||||
: mLifetime( 0.0f ),
|
||||
: mDataBlock( NULL ),
|
||||
mLifetime( 0.0f ),
|
||||
mShapeInstance( NULL ),
|
||||
mWorld( NULL ),
|
||||
mInitialLinVel( Point3F::Zero )
|
||||
|
|
@ -342,6 +343,12 @@ bool PhysicsDebris::onAdd()
|
|||
if ( !Parent::onAdd() )
|
||||
return false;
|
||||
|
||||
if( !mDataBlock )
|
||||
{
|
||||
Con::errorf("PhysicsDebris::onAdd - Fail - No datablock");
|
||||
return false;
|
||||
}
|
||||
|
||||
// If it has a fixed lifetime then calculate it.
|
||||
if ( mDataBlock->lifetime > 0.0f )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue