Fixed bug in ComponentPool::Delete. Wasn't taking EntityID into account when freeing memory.
This commit is contained in:
@@ -59,7 +59,7 @@ bool ComponentPool::KnowsEntity(EntityID ent)
|
|||||||
void ComponentPool::Delete(ComponentWrapper& wrapper)
|
void ComponentPool::Delete(ComponentWrapper& wrapper)
|
||||||
{
|
{
|
||||||
m_EntityToComponent.erase(wrapper.EntityID);
|
m_EntityToComponent.erase(wrapper.EntityID);
|
||||||
m_Pool.Free(wrapper.Data);
|
m_Pool.Free(wrapper.Data - sizeof(EntityID));
|
||||||
}
|
}
|
||||||
|
|
||||||
ComponentPool::iterator ComponentPool::begin() const
|
ComponentPool::iterator ComponentPool::begin() const
|
||||||
|
|||||||
Reference in New Issue
Block a user