| 61 | } |
| 62 | |
| 63 | void 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 | |
| 97 | bool Tr2ActionPlayMeshAnimation::OnModified( Be::Var* value ) |
| 98 | { |
nothing calls this directly
no test coverage detected