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

Method Stop

trinity/Controllers/Actions/Tr2ActionPlayMeshAnimation.cpp:63–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63void Tr2ActionPlayMeshAnimation::Stop( ITr2ActionController& controller )
64{
65 if( m_animation.empty() )
66 {
67 return;
68 }
69 ITr2GrannyAnimationOwnerPtr owner = BlueCastPtr( m_destinationType == DestinationType::OWNER ? controller.GetOwner() : m_destination.GetBoundObject() );
70 if( !owner )
71 {
72 return;
73 }
74 auto ac = owner->GetAnimationController();
75 if( !ac )
76 {
77 return;
78 }
79 auto layer = ac->GetAnimationLayer( m_mask.empty() ? nullptr : m_mask.c_str() );
80 if( !layer )
81 {
82 return;
83 }
84 switch( m_stopAction )
85 {
86 case STOP:
87 layer->ClearAnimations();
88 break;
89 case ENQUEUE_STOP:
90 layer->EndAnimation();
91 break;
92 default:
93 break;
94 }
95}
96
97bool Tr2ActionPlayMeshAnimation::OnModified( Be::Var* value )
98{

Callers

nothing calls this directly

Calls 7

emptyMethod · 0.80
GetBoundObjectMethod · 0.80
GetAnimationLayerMethod · 0.80
GetOwnerMethod · 0.45
ClearAnimationsMethod · 0.45
EndAnimationMethod · 0.45

Tested by

no test coverage detected