run secondary mixing step for all entities and not just the alive ones

This commit is contained in:
kurokuukyo 2026-04-21 07:01:06 -04:00
parent 7dfe511e1a
commit 65b6629c8f

View file

@ -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