snapshot: avoid setting the wrong version for entities during a restore (close #588)

This commit is contained in:
Michele Caini
2020-11-14 16:44:59 +01:00
parent c386a9d140
commit 2396c9b6da

View File

@@ -302,7 +302,7 @@ class basic_continuous_loader {
if(const auto it = remloc.find(entt); it == remloc.cend()) {
const auto local = reg->create();
remloc.emplace(entt, std::make_pair(local, true));
reg->destroy(local, 0u);
reg->destroy(local);
}
}