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

Method RemoveDynamic

trinity/Interior/Tr2InteriorScene.cpp:1002–1022  ·  view source on GitHub ↗

-------------------------------------------------------------------------------------- Description: Removes a dynamic object from the scene. The dynamic is also removed from all cells containing it. If the dynamic is in the pending load queue, it is removed from the queue. It is an error to remove a NULL dynamic, and a log message is printed saying so. Arguments: dynamic - The dynamic object to

Source from the content-addressed store, hash-verified

1000// dynamic - The dynamic object to remove from the interior scene (should not be NULL)
1001// --------------------------------------------------------------------------------------
1002void Tr2InteriorScene::RemoveDynamic( ITr2InteriorDynamic* dynamic )
1003{
1004 // Find this dynamic in our list
1005 ssize_t pos = m_dynamics.FindKey( dynamic );
1006 if( pos == -1 )
1007 {
1008 CCP_LOG( "Tr2InteriorScene::RemoveDynamic() - interiorDynamic not found in the scene!" );
1009 return;
1010 }
1011
1012 dynamic->RemoveFromScene();
1013
1014 m_dynamics.Remove( pos );
1015
1016 // See if this dynamic is in the pending load list
1017 pos = m_dynamicsPendingLoad.FindKey( dynamic );
1018 if( pos != -1 )
1019 {
1020 m_dynamicsPendingLoad.Remove( pos );
1021 }
1022}
1023
1024// --------------------------------------------------------------------------------------
1025// Description

Callers

nothing calls this directly

Calls 1

RemoveFromSceneMethod · 0.45

Tested by

no test coverage detected