-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calling destroy twice has very odd effects #66
Comments
I wasn't able to reproduce this with a test. Lines 1918 to 1970 in 9dcbcd2
However, you're right, that Is there some other way that I can reproduce the problem in the previous commit reliably? In any case, ape-ecs@1.3.1 has been published. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was accidentally calling
world.removeEntity
and thenentity.destroy
in sequence.I noticed that doing this led to the entity's components not being cleared before it was entered into the entity pool. As I was stepping through the code I could clearly see that my entities were in the pool and all of its components were still defined.
Later on in the code, I called
createEntity
and the latest destroyed entity would be popped from the pool, with all of its original components. So the two component definitions would be overlaid on top of each other.This is very surprising. I would expect the second call would be a no-op or would throw an error saying
this entity is already destroyed
.The text was updated successfully, but these errors were encountered: