Fixed entities not being added to pools in some scenarios

This commit is contained in:
Justin van der Leij 2018-04-20 10:52:40 +02:00
parent af16e5a2d9
commit 6caf99afb4
3 changed files with 8 additions and 5 deletions

View file

@ -79,14 +79,10 @@ function System:__check(e)
pool:add(e)
self:entityAddedTo(e, pool)
self:__tryAdd(e)
return true
elseif poolHas and not eligible then
pool:remove(e)
self:entityRemovedFrom(e, pool)
self:__tryRemove(e)
return false
end
end
end