Large objects can straddle the divide, however, and appear in both lists, so they would be double-counted. I don't know how to compare if two entity objects are equal, though, in order to remove duplicates. The following code doesn't work:
Code: Select all
local hash, joint_list_2 = {}
for _, e in pairs(joint_list) do
if (not hash[e]) then
hash[e] = true
joint_list_2[#joint_list_2 + 1] = e
end
end
Any suggestions?