Avoid stack overflow using wireless + digilines

Fixes #16
This commit is contained in:
upsilon 2021-03-07 10:17:05 +01:00
parent 4d7508ae70
commit 227cba54b2

@ -264,11 +264,14 @@ local function on_digiline_receive(pos, node, channel, msg)
return return
end end
for i, wl_pos in pairs(wireless[wls.owner][wls.channel].members) do -- Why is delaying required? https://github.com/minetest-mods/MoreMesecons/issues/16
if i ~= wls.id and check_wireless_exists(wl_pos) then minetest.after(0, function()
digiline:receptor_send(wl_pos, digiline.rules.default, channel, msg) for i, wl_pos in pairs(wireless[wls.owner][wls.channel].members) do
if i ~= wls.id and check_wireless_exists(wl_pos) then
digiline:receptor_send(wl_pos, digiline.rules.default, channel, msg)
end
end end
end end)
end end
mesecon.register_node("moremesecons_wireless:wireless", { mesecon.register_node("moremesecons_wireless:wireless", {