From: Novatux Date: Tue, 18 Mar 2014 19:02:18 +0000 (+0100) Subject: Fix "ghost stacks" created when a player clicks an item on the ground: X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=936c6f577ad70c9a467eaed58233e737671375df;p=zefram%2Fminetest%2Fminetest_engine.git 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 --- diff --git a/builtin/item_entity.lua b/builtin/item_entity.lua index 95affe3d..0dcc2dc2 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, })