Merge branch 'master' of github.com:sippeangelo/Escape-the-Dawn
Conflicts: Escape-the-Dawn/GameWorld.cpp Escape-the-Dawn/plane.obj
This commit is contained in:
@@ -61,6 +61,12 @@ bool World::ValidEntity(EntityID entity)
|
||||
void World::RemoveEntity(EntityID entity)
|
||||
{
|
||||
m_EntityParents.erase(entity);
|
||||
m_EntityComponents.erase(entity);
|
||||
for (auto pair : m_EntityComponents[entity]) {
|
||||
auto type = pair.first;
|
||||
auto component = pair.second;
|
||||
m_ComponentsOfType[type].erase(std::remove(m_ComponentsOfType[type].begin(), m_ComponentsOfType[type].end(), component));
|
||||
}
|
||||
RecycleEntityID(entity);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user