| 768 | } |
| 769 | |
| 770 | void 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 | |
| 798 | void PhysicsShape::_onPhysicsReset( PhysicsResetEvent reset ) |
| 799 | { |
nothing calls this directly
no test coverage detected