From 936c6f577ad70c9a467eaed58233e737671375df Mon Sep 17 00:00:00 2001 From: Novatux Date: Tue, 18 Mar 2014 20:02:18 +0100 Subject: Fix "ghost stacks" created when a player clicks an item on the ground: since the object is not immediately removed, any other code may still think an object is there, therefore leading to item duplication. This code therefore sets the itemstring to '' after the object is picked up to avoid such issues --- builtin/item_entity.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'builtin/item_entity.lua') diff --git a/builtin/item_entity.lua b/builtin/item_entity.lua index 95affe3da..0dcc2dc2d 100644 --- a/builtin/item_entity.lua +++ b/builtin/item_entity.lua @@ -116,6 +116,7 @@ minetest.register_entity("__builtin:item", { return end end + self.itemstring = '' self.object:remove() end, }) -- cgit v1.2.3