MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / _initAmbient

Method _initAmbient

Engine/source/T3D/physics/physicsShape.cpp:770–796  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

768}
769
770void PhysicsShape::_initAmbient()
771{
772 if ( isServerObject() )
773 return;
774
775 bool willPlay = mPlayAmbient && mAmbientSeq != -1;
776
777 if ( willPlay )
778 {
779 // Create thread if we dont already have.
780 if ( mAmbientThread == NULL )
781 mAmbientThread = mShapeInst->addThread();
782
783 // Play the sequence.
784 mShapeInst->setSequence( mAmbientThread, mAmbientSeq, 0);
785
786 setProcessTick(true);
787 }
788 else
789 {
790 if ( mAmbientThread != NULL )
791 {
792 mShapeInst->destroyThread( mAmbientThread );
793 mAmbientThread = NULL;
794 }
795 }
796}
797
798void PhysicsShape::_onPhysicsReset( PhysicsResetEvent reset )
799{

Callers

nothing calls this directly

Calls 3

addThreadMethod · 0.45
setSequenceMethod · 0.45
destroyThreadMethod · 0.45

Tested by

no test coverage detected