Shots fired! ( ゚Д゚)

This commit is contained in:
ViktorLjung
2014-05-13 03:32:58 +02:00
parent 74d3269e35
commit ce5b62cf6d
12 changed files with 70 additions and 74 deletions
+4
View File
@@ -170,6 +170,8 @@ EntityID World::CloneEntity(EntityID entity, EntityID parent /* = 0 */)
for (auto pair : m_EntityComponents[entity])
{
auto type = pair.first;
if (type == "Template")
continue;
auto component = std::shared_ptr<Component>(pair.second->Clone());
if (component != nullptr)
{
@@ -186,6 +188,8 @@ EntityID World::CloneEntity(EntityID entity, EntityID parent /* = 0 */)
}
}
CommitEntity(clone);
return clone;
}