| 34 | } |
| 35 | |
| 36 | void Tr2ActionPlayMeshAnimation::Start( ITr2ActionController& controller ) |
| 37 | { |
| 38 | if( m_animation.empty() ) |
| 39 | { |
| 40 | return; |
| 41 | } |
| 42 | if( HasDelayedBinding() ) |
| 43 | { |
| 44 | LinkDestination( controller ); |
| 45 | } |
| 46 | ITr2GrannyAnimationOwnerPtr owner = BlueCastPtr( m_destinationType == DestinationType::OWNER ? controller.GetOwner() : m_destination.GetBoundObject() ); |
| 47 | if( !owner ) |
| 48 | { |
| 49 | return; |
| 50 | } |
| 51 | auto ac = owner->GetAnimationController(); |
| 52 | if( !ac ) |
| 53 | { |
| 54 | return; |
| 55 | } |
| 56 | if( !m_mask.empty() ) |
| 57 | { |
| 58 | ac->AddAnimationLayerWithTrackMask( m_mask.c_str(), m_mask.c_str() ); |
| 59 | } |
| 60 | ac->PlayLayerAnimationByName( m_mask.empty() ? nullptr : m_mask.c_str(), m_animation.c_str(), m_playAction == PLAY, std::max( m_loops, 0 ), m_delay, m_speed, false ); |
| 61 | } |
| 62 | |
| 63 | void Tr2ActionPlayMeshAnimation::Stop( ITr2ActionController& controller ) |
| 64 | { |
nothing calls this directly
no test coverage detected