mirror of
https://github.com/Ukendio/jecs.git
synced 2026-05-13 14:24:14 +00:00
run secondary mixing step for all entities and not just the alive ones
This commit is contained in:
parent
7dfe511e1a
commit
65b6629c8f
1 changed files with 6 additions and 1 deletions
|
|
@ -3364,7 +3364,12 @@ TEST("world:targets()", function()
|
||||||
CHECK(seen[t] == true)
|
CHECK(seen[t] == true)
|
||||||
end
|
end
|
||||||
|
|
||||||
for t in world:targets(e, ROOT) do
|
for j = 1, #all_targets do
|
||||||
|
local t: Entity
|
||||||
|
while t == nil do
|
||||||
|
t = all_targets[j]
|
||||||
|
end
|
||||||
|
|
||||||
if math.random() < 0.5 then
|
if math.random() < 0.5 then
|
||||||
world:remove(e, jecs.pair(ROOT, t))
|
world:remove(e, jecs.pair(ROOT, t))
|
||||||
alive[t] = nil
|
alive[t] = nil
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue