Add a check for item being on ground.

This commit is contained in:
IQuant 2024-09-21 12:39:18 +03:00
parent 9c28af838f
commit ca32961147

View file

@ -174,7 +174,7 @@ local function send_item_positions()
for _, item in ipairs(EntityGetWithTag("ew_global_item")) do for _, item in ipairs(EntityGetWithTag("ew_global_item")) do
local gid = item_sync.get_global_item_id(item) local gid = item_sync.get_global_item_id(item)
-- Only send info about items created by us. -- Only send info about items created by us.
if is_my_item(gid) then if is_my_item(gid) and is_item_on_ground(item) then
local x, y = EntityGetTransform(item) local x, y = EntityGetTransform(item)
position_data[gid] = {x, y} position_data[gid] = {x, y}
end end