Skip to content

Commit 936c6f5

Browse files
committedMar 22, 2014
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
1 parent 5fefc4b commit 936c6f5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

Diff for: ‎builtin/item_entity.lua

+1
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ minetest.register_entity("__builtin:item", {
116116
return
117117
end
118118
end
119+
self.itemstring = ''
119120
self.object:remove()
120121
end,
121122
})

0 commit comments

Comments
 (0)