MCPcopy Create free account
hub / github.com/carbonengine/trinity / FreeCompletedControls

Method FreeCompletedControls

trinity/Tr2GrannyAnimationLayer.cpp:766–793  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

764#endif
765
766void Tr2GrannyAnimationLayer::FreeCompletedControls()
767{
768 if( m_sequencer )
769 {
770 m_sequencer->EnumerateAnimations( [&]( const std::shared_ptr<cmf::AnimationPlayer>& player ) {
771 if( !player->IsActive( GetLayerAnimationTime() ) )
772 {
773 ClearMorphTracks( player.get() );
774 }
775 } );
776 }
777
778#if WITH_GRANNY
779 if( m_modelInstance )
780 {
781 for( granny_model_control_binding* binding = GrannyModelControlsBegin( m_modelInstance ); binding != GrannyModelControlsEnd( m_modelInstance ); )
782 {
783 granny_control* control = GrannyGetControlFromBinding( binding );
784 binding = GrannyModelControlsNext( binding );
785 if( GrannyFreeControlIfComplete( control ) )
786 {
787 ClearTextTracks( control );
788 ClearMorphTracks( control );
789 }
790 }
791 }
792#endif
793}
794
795float Tr2GrannyAnimationLayer::GetAnimationChainCompleteTime()
796{

Callers

nothing calls this directly

Calls 2

getMethod · 0.80
IsActiveMethod · 0.45

Tested by

no test coverage detected