mirror of
https://github.com/Ukendio/jecs.git
synced 2025-08-04 11:19:17 +00:00
Compare commits
2 commits
78fe5338cf
...
eeb8253d32
Author | SHA1 | Date | |
---|---|---|---|
|
eeb8253d32 | ||
|
3e995c9d7d |
2 changed files with 3 additions and 2 deletions
|
@ -1428,7 +1428,7 @@ local function query_iter_init(query: QueryInner): () -> (number, ...any)
|
||||||
i -= 1
|
i -= 1
|
||||||
|
|
||||||
for i = 9, ids_len do
|
for i = 9, ids_len do
|
||||||
output[i - 8] = columns_map[i][row]
|
output[i - 8] = columns_map[ids[i]][row]
|
||||||
end
|
end
|
||||||
|
|
||||||
return entity, a[row], b[row], c[row], d[row], e[row], f[row], g[row], h[row], unpack(output)
|
return entity, a[row], b[row], c[row], d[row], e[row], f[row], g[row], h[row], unpack(output)
|
||||||
|
@ -1903,7 +1903,7 @@ local function query_cached(query: QueryInner)
|
||||||
i -= 1
|
i -= 1
|
||||||
|
|
||||||
for i = 9, ids_len do
|
for i = 9, ids_len do
|
||||||
output[i - 8] = columns_map[i][row]
|
output[i - 8] = columns_map[ids[i]][row]
|
||||||
end
|
end
|
||||||
|
|
||||||
return entity, a[row], b[row], c[row], d[row], e[row], f[row], g[row], unpack(output)
|
return entity, a[row], b[row], c[row], d[row], e[row], f[row], g[row], unpack(output)
|
||||||
|
|
|
@ -1536,6 +1536,7 @@ TEST("world:query()", function()
|
||||||
|
|
||||||
for i = 1, 9 do
|
for i = 1, 9 do
|
||||||
local id = world:component()
|
local id = world:component()
|
||||||
|
world:component() -- make the components sparsely interleaved
|
||||||
components[i] = id
|
components[i] = id
|
||||||
end
|
end
|
||||||
local e1 = world:entity()
|
local e1 = world:entity()
|
||||||
|
|
Loading…
Reference in a new issue