fix entity_duplicate prefix sum in release mode #184
This commit is contained in:
@@ -1525,14 +1525,16 @@ namespace wiScene
|
||||
|
||||
// Gather all descendants in the hierarchy:
|
||||
std::unordered_map<Entity, size_t> descendants;
|
||||
descendants[entity] = descendants.size();
|
||||
size_t prefix = descendants.size();
|
||||
descendants[entity] = prefix;
|
||||
for (size_t i = 0; i < hierarchy.GetCount(); ++i)
|
||||
{
|
||||
const HierarchyComponent& hier = hierarchy[i];
|
||||
if (descendants.count(hier.parentID) != 0)
|
||||
{
|
||||
Entity child = hierarchy.GetEntity(i);
|
||||
descendants[child] = descendants.size();
|
||||
prefix = descendants.size();
|
||||
descendants[child] = prefix;
|
||||
Entity_Serialize(archive, child);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace wiVersion
|
||||
// minor features, major updates, breaking API changes
|
||||
const int minor = 49;
|
||||
// minor bug fixes, alterations, refactors, updates
|
||||
const int revision = 15;
|
||||
const int revision = 16;
|
||||
|
||||
const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user