mirror of
https://github.com/Ukendio/jecs.git
synced 2026-03-18 00:44:32 +00:00
Fix example on networking
This commit is contained in:
parent
8ba09057be
commit
eacc343551
1 changed files with 2 additions and 1 deletions
|
|
@ -169,11 +169,12 @@ local function networking_send(world: jecs.World)
|
||||||
local set_values = {} :: { any }
|
local set_values = {} :: { any }
|
||||||
local set_n = 0
|
local set_n = 0
|
||||||
local removed_n = 0
|
local removed_n = 0
|
||||||
|
local component_is_a_tag = jecs.is_tag(world, component)
|
||||||
for e, v in storage do
|
for e, v in storage do
|
||||||
if v ~= "jecs.Remove" then
|
if v ~= "jecs.Remove" then
|
||||||
set_n += 1
|
set_n += 1
|
||||||
set_ids[set_n] = e
|
set_ids[set_n] = e
|
||||||
set_values[set_n] = if is_tag then 0 else v
|
set_values[set_n] = if component_is_a_tag then 0 else v
|
||||||
elseif world:contains(e) then
|
elseif world:contains(e) then
|
||||||
removed_n += 1
|
removed_n += 1
|
||||||
removed_ids[removed_n] = e
|
removed_ids[removed_n] = e
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue