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
This commit is contained in:
Novatux 2014-03-18 20:02:18 +01:00
parent 5fefc4bbf6
commit 936c6f577a
1 changed files with 1 additions and 0 deletions

View File

@ -116,6 +116,7 @@ minetest.register_entity("__builtin:item", {
return
end
end
self.itemstring = ''
self.object:remove()
end,
})