MCPcopy Create free account
hub / github.com/JACoders/OpenJK / MarkTask

Method MarkTask

code/icarus/TaskManager.cpp:886–920  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

884*/
885
886int CTaskManager::MarkTask( int id, int operation, CIcarus* icarus )
887{
888 CTaskGroup *group = GetTaskGroup( id, icarus );
889
890 assert( group );
891
892 if ( group == NULL )
893 return TASK_FAILED;
894
895 if ( operation == TASK_START )
896 {
897 //Reset all the completion information
898 group->Init();
899
900 group->SetParent( m_curGroup );
901 m_curGroup = group;
902 }
903 else if ( operation == TASK_END )
904 {
905 assert( m_curGroup );
906 if ( m_curGroup == NULL )
907 return TASK_FAILED;
908
909 m_curGroup = m_curGroup->GetParent();
910 }
911
912#ifdef _DEBUG
913 else
914 {
915 assert(0);
916 }
917#endif
918
919 return TASK_OK;
920}
921
922/*
923-------------------------

Callers 1

CheckDoMethod · 0.45

Calls 3

InitMethod · 0.45
SetParentMethod · 0.45
GetParentMethod · 0.45

Tested by

no test coverage detected