Fix pickup of dropped items when the player only takes a part of them
authorPilzAdam <pilzadam@minetest.net>
Sun, 3 Mar 2013 15:34:06 +0000 (16:34 +0100)
committerPilzAdam <pilzadam@minetest.net>
Sun, 3 Mar 2013 15:35:29 +0000 (16:35 +0100)
builtin/item_entity.lua

index 1699cb03c0c49d590b516c8ca20a84af9d9e8b1a..50ce7eafedc3b8212079dfac4e4941796ef0a54a 100644 (file)
@@ -111,6 +111,7 @@ minetest.register_entity("__builtin:item", {
                if self.itemstring ~= '' then
                        local left = hitter:get_inventory():add_item("main", self.itemstring)
                        if not left:is_empty() then
+                               self.itemstring = left:to_string()
                                return
                        end
                end