add protector_hurt delay to fix drop issue
This commit is contained in:
parent
b6b5460fcd
commit
39cd62a221
1 changed files with 5 additions and 1 deletions
4
init.lua
4
init.lua
|
|
@ -293,7 +293,11 @@ function minetest.is_protected(pos, digger)
|
|||
|
||||
-- hurt player if protection violated
|
||||
if protector_hurt > 0 and player:get_hp() > 0 then
|
||||
|
||||
-- This delay fixes item duplication bug (thanks luk3yx)
|
||||
minetest.after(0.1, function()
|
||||
player:set_hp(player:get_hp() - protector_hurt)
|
||||
end)
|
||||
end
|
||||
|
||||
-- flip player when protection violated
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue