Sdk/World: Fix entity ids being reused before destruction
This commit is contained in:
@@ -185,12 +185,12 @@ namespace Ndk
|
|||||||
|
|
||||||
NazaraAssert(entity.IsValid(), "Entity must be valid");
|
NazaraAssert(entity.IsValid(), "Entity must be valid");
|
||||||
|
|
||||||
// Send back the identifier of the entity to the free queue
|
|
||||||
m_freeIdList.push_back(entity.GetId());
|
|
||||||
|
|
||||||
// Destruction of the entity (invalidation of handle by the same way)
|
// Destruction of the entity (invalidation of handle by the same way)
|
||||||
entity.Destroy();
|
entity.Destroy();
|
||||||
|
|
||||||
|
// Send back the identifier of the entity to the free queue
|
||||||
|
m_freeIdList.push_back(entity.GetId());
|
||||||
|
|
||||||
// We take out the handle from the list of alive entities
|
// We take out the handle from the list of alive entities
|
||||||
// With the idiom swap and pop
|
// With the idiom swap and pop
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user