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

Method RemoveAction

trinity/Controllers/Tr2TimelineController.cpp:530–553  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

528}
529
530BlueStdResult Tr2TimelineController::RemoveAction( size_t index )
531{
532 if( index >= m_actions.size() )
533 {
534 return BlueStdResult( BLUE_STD_RESULT_VALUE_ERROR, "Index out of range" );
535 }
536 if( m_owner )
537 {
538 if( m_isActive && IsActionEnabled( index ) )
539 {
540 auto action = m_actions[index];
541 auto& entry = m_entries[index];
542 if( InRange( m_time, entry ) )
543 {
544 CcpAutoMutex lock( g_controllerMutex );
545 action->Stop( *this );
546 }
547 }
548 m_actions[index]->Unlink();
549 }
550 m_actions.Remove( index );
551 m_entries.Remove( index );
552 return {};
553}
554
555bool Tr2TimelineController::IsActionEnabled( size_t index ) const
556{

Callers

nothing calls this directly

Calls 4

InRangeFunction · 0.85
sizeMethod · 0.80
StopMethod · 0.45
UnlinkMethod · 0.45

Tested by

no test coverage detected