MCPcopy Create free account
hub / github.com/MergHQ/CRYENGINE / Reset

Method Reset

Code/CryEngine/CryAction/ActorSystem.cpp:95–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95void CActorSystem::Reset()
96{
97 if (GetISystem()->IsSerializingFile() == 1)
98 {
99 TActorMap::iterator it = m_actors.begin();
100 IEntitySystem* pEntitySystem = gEnv->pEntitySystem;
101 for (; it != m_actors.end(); )
102 {
103 EntityId id = it->first;
104 IEntity* pEntity = pEntitySystem->GetEntity(id);
105 if (pEntity != NULL)
106 {
107 ++it;
108 }
109 else
110 {
111 TActorMap::iterator eraseIt = it++;
112 m_actors.erase(eraseIt);
113 }
114 }
115 }
116
117 std::for_each(m_iteratorPool.begin(), m_iteratorPool.end(), DeleteActorIterator);
118 stl::free_container(m_iteratorPool);
119}
120
121//------------------------------------------------------------------------
122IActor* CActorSystem::GetActor(EntityId entityId)

Callers

nothing calls this directly

Calls 7

GetISystemFunction · 0.85
IsSerializingFileMethod · 0.80
free_containerFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
GetEntityMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected