Sdk/EntityList: Fix copy assignation

This commit is contained in:
Jérôme Leclercq 2018-03-12 09:19:46 +01:00
parent 3036c32d9d
commit 2d56911e82
2 changed files with 4 additions and 0 deletions

View File

@ -108,6 +108,7 @@ Nazara Development Kit:
- World entity ids are now reused from lowest to highest (they were previously reused in reverse order of death)
- World now has an internal profiler, allowing to measure the refresh and system update time
- CollisionComponent[2D|3D] and PhysicsComponent[2D|3D] now configures their internal RigidBody userdata to the entity ID they belong to (useful for callbacks).
- Fixed EntityList copy/movement assignment operator which was not properly unregistering contained entities.
# 0.4:

View File

@ -169,6 +169,9 @@ namespace Ndk
inline EntityList& EntityList::operator=(const EntityList& entityList)
{
for (const Ndk::EntityHandle& entity : *this)
entity->UnregisterEntityList(this);
m_entityBits = entityList.m_entityBits;
m_world = entityList.m_world;