Quake brushes are not deserialized correctly, meaning you can build navmesh without rebuilding the quake map first.

This commit is contained in:
Antoine Pilote
2024-07-11 15:07:54 -04:00
parent 7b48319ff5
commit 8b8e29db3f
7 changed files with 39 additions and 2 deletions

View File

@@ -557,6 +557,7 @@ namespace Nuake
m_EditorCamera->Deserialize(j["m_EditorCamera"]);
}
// TODO: Move this to post deserialize.
auto view = m_Registry.view<ParentComponent>();
for (auto e : view)
{
@@ -569,6 +570,14 @@ namespace Nuake
parentEntity.AddChild(entity);
}
// This will turn the deserialized entity ids into actual Entities.
// This has to be done after the whole scene has been deserialized
// to make sure we can fetch the id in the scene. Otherwise, we could
m_Registry.each([this](auto e) {
auto entity = Entity{ e, this };
entity.PostDeserialize();
});
return true;
}