make net updates c

This commit is contained in:
Redo
2022-11-04 23:23:44 -06:00
parent 17edf2a782
commit c73fea8cca
6 changed files with 106 additions and 26 deletions

View File

@@ -212,23 +212,23 @@ function Group.mergeinto(group, group2)
end
-- Logic Critical
function Group.update_c(cnet, tick)
local state = cnet.state_num[0]>0 and 1 or 0
if state ~= cnet.state[0] then
cnet.state[0] = state
cnet.update_tick[0] = tick
local len = cnet.num_gates_update[0]-1
for i = 0, len do
local cgate = cnet.gates_update_c[i]
if cgate.in_queue[0]==0 then
Simulation.queuegate_c(GSim, cgate)
end
end
--Simulation.queuegroupfx(GSim, net)
end
end
--function Group.update_c(cnet, tick)
-- local state = cnet.state_num[0]>0 and 1 or 0
-- if state ~= cnet.state[0] then
-- cnet.state[0] = state
-- cnet.update_tick[0] = tick
--
-- local len = cnet.num_gates_update[0]-1
-- for i = 0, len do
-- local cgate = cnet.gates_update_c[i]
-- if cgate.in_queue[0]==0 then
-- Simulation.queuegate_c(GSim, cgate)
-- end
-- end
--
-- --Simulation.queuegroupfx(GSim, net)
-- end
--end
function Group.rebuild_ports(net)
net.gates_update = {}