| 93 | } |
| 94 | |
| 95 | void 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 | //------------------------------------------------------------------------ |
| 122 | IActor* CActorSystem::GetActor(EntityId entityId) |
nothing calls this directly
no test coverage detected