Merge remote-tracking branch 'refs/remotes/origin/master' into enet_wip_nothing_to_see_here
This commit is contained in:
commit
28e6b3869b
|
|
@ -152,6 +152,10 @@ namespace Ndk
|
||||||
for (std::size_t i = m_componentBits.FindFirst(); i != m_componentBits.npos; i = m_componentBits.FindNext(i))
|
for (std::size_t i = m_componentBits.FindFirst(); i != m_componentBits.npos; i = m_componentBits.FindNext(i))
|
||||||
m_components[i]->OnEntityDestruction();
|
m_components[i]->OnEntityDestruction();
|
||||||
|
|
||||||
|
// Detach components while they're still attached to systems
|
||||||
|
for (std::size_t i = m_componentBits.FindFirst(); i != m_componentBits.npos; i = m_componentBits.FindNext(i))
|
||||||
|
m_components[i]->SetEntity(nullptr);
|
||||||
|
|
||||||
// We alert each system
|
// We alert each system
|
||||||
for (std::size_t index = m_systemBits.FindFirst(); index != m_systemBits.npos; index = m_systemBits.FindNext(index))
|
for (std::size_t index = m_systemBits.FindFirst(); index != m_systemBits.npos; index = m_systemBits.FindNext(index))
|
||||||
{
|
{
|
||||||
|
|
@ -165,10 +169,7 @@ namespace Ndk
|
||||||
}
|
}
|
||||||
m_systemBits.Clear();
|
m_systemBits.Clear();
|
||||||
|
|
||||||
// We properly destroy each component
|
// Destroy components
|
||||||
for (std::size_t i = m_componentBits.FindFirst(); i != m_componentBits.npos; i = m_componentBits.FindNext(i))
|
|
||||||
m_components[i]->SetEntity(nullptr);
|
|
||||||
|
|
||||||
m_components.clear();
|
m_components.clear();
|
||||||
m_componentBits.Reset();
|
m_componentBits.Reset();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue