1
0
mirror of https://github.com/minetest-mods/3d_armor.git synced 2024-12-26 18:50:40 +01:00

Fix nil index in on_damage callback

This commit is contained in:
stujones11 2017-05-03 17:56:32 +01:00
parent 47734969e2
commit 793c74856f

View File

@ -366,7 +366,7 @@ end
armor.damage = function(self, player, index, stack, use)
local old_stack = ItemStack(stack)
stack:add_wear(use)
self:run_callbacks("on_damage", player, i, stack)
self:run_callbacks("on_damage", player, index, stack)
self:set_inventory_stack(player, index, stack)
if stack:get_count() == 0 then
self:run_callbacks("on_unequip", player, index, old_stack)