Entity 0 is now a real entity in the world, created by the first entity read while importing. This makes the difference between map files and entity files automatic, since consecutive entity file loads should automatically get the world as parent, as long as the world entity has been created earlier.
This commit is contained in:
@@ -27,7 +27,7 @@ void EntityFileParser::onStartEntity(EntityID entity, EntityID parent)
|
||||
void EntityFileParser::onStartComponent(EntityID entity, std::string component)
|
||||
{
|
||||
EntityID realEntity = m_EntityIDMapper.at(entity);
|
||||
m_World->AttachComponent(entity, component);
|
||||
m_World->AttachComponent(realEntity, component);
|
||||
LOG_DEBUG("Attached component of type \"%s\" to entity #%i (%i)", component.c_str(), entity, realEntity);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user