undo c struct queues

This commit is contained in:
Redo
2022-11-04 17:22:51 -06:00
parent 898726af35
commit 0cb1ef5540
2 changed files with 19 additions and 29 deletions

View File

@@ -210,21 +210,20 @@ function Group.mergeinto(group, group2)
end
-- Logic Critical
function Group.update_net_c(netc, tick)
local state = netc.state_num[0]>0 and 1 or 0
if state ~= netc.state[0] then
netc.state[0] = state
netc.update_tick[0] = tick
function Group.update(net, tick)
local state = net.state_num[0]>0 and 1 or 0
if state ~= net.state[0] then
net.state[0] = state
net.update_tick[0] = tick
local len = netc.num_gates_update[0]-1
local len = net.num_gates_update[0]-1
for i = 0, len do
local gatec = netc.gates_update_c[i]
if gatec and gatec.in_queue[0]==0 then
Simulation.queue_gate_c(GSim, gatec)
local gate = net.gates_update[i+1]
if gate.in_queue[0]==0 then
Simulation.queuegate(GSim, gate)
end
end
local net = Simulation.net_from_netc(GSim, netc)
Simulation.queuegroupfx(GSim, net)
end
end