05-20-2013, 01:49 AM
I have identified the problem in ForEachEntity(), should be fixed in rev 1491. Also wrote some test Lua code for it, so you can have a look in the Debuggers plugin to see how it's used.
A few notes on the function itself:
- it "sees" all entities, even in chunks that aren't ticked by the server
- if an entity is destroyed, it will not be removed immediately, but instead will be marked as destroyed and when the chunk ticks, it will remove the entity
--> so it's perfectly valid to kill all entities and still see them in a subsequent listing - simply because the chunks they're in haven't been ticked yet.
A few notes on the function itself:
- it "sees" all entities, even in chunks that aren't ticked by the server
- if an entity is destroyed, it will not be removed immediately, but instead will be marked as destroyed and when the chunk ticks, it will remove the entity
--> so it's perfectly valid to kill all entities and still see them in a subsequent listing - simply because the chunks they're in haven't been ticked yet.