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:
ViktorLjung
2014-03-13 02:02:41 +01:00
17 changed files with 314 additions and 64 deletions
+6
View File
@@ -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);
}