Fixed bug in ComponentPool::Delete. Wasn't taking EntityID into account when freeing memory.

This commit is contained in:
2015-12-13 19:59:50 +01:00
parent 2018ba27ae
commit 91ace0d2a0
+1 -1
View File
@@ -59,7 +59,7 @@ bool ComponentPool::KnowsEntity(EntityID ent)
void ComponentPool::Delete(ComponentWrapper& wrapper)
{
m_EntityToComponent.erase(wrapper.EntityID);
m_Pool.Free(wrapper.Data);
m_Pool.Free(wrapper.Data - sizeof(EntityID));
}
ComponentPool::iterator ComponentPool::begin() const