Shots fired! ( ゚Д゚)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user