make net update use c structT
This commit is contained in:
@@ -213,15 +213,17 @@ end
|
||||
|
||||
-- Logic Critical
|
||||
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 cnet = net.c
|
||||
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 = net.num_gates_update[0]-1
|
||||
local len = cnet.num_gates_update[0]-1
|
||||
for i = 0, len do
|
||||
local gate = net.gates_update[i+1]
|
||||
if gate.in_queue[0]==0 then
|
||||
local cgate = cnet.gates_update_c[i]
|
||||
if cgate.in_queue[0]==0 then
|
||||
local gate = Simulation.gate_from_cgate(sim, cgate)
|
||||
Simulation.queuegate(GSim, gate)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user