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

Method AddAction

trinity/Controllers/Tr2TimelineController.cpp:504–528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

502}
503
504void Tr2TimelineController::AddAction( ITr2ControllerAction* action, float startTime, float endTime, uint32_t trackID )
505{
506 if( !action )
507 {
508 return;
509 }
510
511 m_actions.Append( action );
512
513 if( m_owner )
514 {
515 action->Link( *this );
516 }
517 Tr2TimelineEntry entry = { startTime, endTime, trackID };
518 m_entries.Append( &entry );
519
520 if( m_isActive )
521 {
522 if( InRange( m_time, entry ) && IsActionEnabled( m_entries.size() - 1 ) )
523 {
524 CcpAutoMutex lock( g_controllerMutex );
525 action->Start( *this );
526 }
527 }
528}
529
530BlueStdResult Tr2TimelineController::RemoveAction( size_t index )
531{

Callers

nothing calls this directly

Calls 5

InRangeFunction · 0.85
AppendMethod · 0.80
sizeMethod · 0.80
LinkMethod · 0.45
StartMethod · 0.45

Tested by

no test coverage detected