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 issuesmaster
parent
5fefc4bbf6
commit
936c6f577a
|
@ -116,6 +116,7 @@ minetest.register_entity("__builtin:item", {
|
|||
return
|
||||
end
|
||||
end
|
||||
self.itemstring = ''
|
||||
self.object:remove()
|
||||
end,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue