| 8 | |
| 9 | |
| 10 | bool Tr2SyncToAnimation::CanTransition( Tr2Controller& controller ) const |
| 11 | { |
| 12 | EveSpaceObject2Ptr spaceObject = BlueCastPtr( controller.GetOwner() ); |
| 13 | if( !spaceObject ) |
| 14 | { |
| 15 | return true; |
| 16 | } |
| 17 | auto ac = spaceObject->GetAnimationController(); |
| 18 | if( !ac ) |
| 19 | { |
| 20 | return true; |
| 21 | } |
| 22 | auto layer = ac->GetAnimationLayer( m_mask.empty() ? nullptr : m_mask.c_str() ); |
| 23 | if( !layer ) |
| 24 | { |
| 25 | return true; |
| 26 | } |
| 27 | auto remaining = layer->GetAnimationRemainingTime(); |
| 28 | return remaining <= 0; |
| 29 | } |
no test coverage detected