-------------------------------------------------------------------------------------- Description: Adds a dynamic object to the scene. If the dynamic object is not fully loaded, it is added to a pending load queue for delayed add. An individual dynamic object can only be added to a scene once. It is an error to add a NULL dynamic, and a log message is printed saying so. Arguments: dynamic - Th
| 969 | // dynamic - The dynamic to add to the interior scene (should not be NULL) |
| 970 | // -------------------------------------------------------------------------------------- |
| 971 | void Tr2InteriorScene::AddDynamic( ITr2InteriorDynamic* dynamic ) |
| 972 | { |
| 973 | // Bail out early if the dynamic is NULL |
| 974 | if( !dynamic ) |
| 975 | { |
| 976 | CCP_LOGERR( " Attempt to add NULL dynamic to interior scene!" ); |
| 977 | return; |
| 978 | } |
| 979 | |
| 980 | // See if this dynamic is already in our list |
| 981 | ssize_t pos = m_dynamics.FindKey( dynamic ); |
| 982 | if( pos == -1 ) |
| 983 | { |
| 984 | if( !dynamic->AddToScene( m_apexScene ) && ( m_dynamicsPendingLoad.FindKey( dynamic ) == -1 ) ) |
| 985 | { |
| 986 | m_dynamicsPendingLoad.Insert( -1, dynamic ); |
| 987 | } |
| 988 | |
| 989 | m_dynamics.Insert( -1, dynamic ); |
| 990 | } |
| 991 | } |
| 992 | |
| 993 | // -------------------------------------------------------------------------------------- |
| 994 | // Description: |
nothing calls this directly
no test coverage detected