add delay on hive damage to stop item dupe glitch
This commit is contained in:
parent
3e8a2d6b19
commit
dbbc3fd9d0
10
init.lua
10
init.lua
@ -412,7 +412,10 @@ minetest.register_node("bees:hive_wild", {
|
|||||||
if meta:get_int("agressive") == 1
|
if meta:get_int("agressive") == 1
|
||||||
and inv:contains_item("queen", "bees:queen") then
|
and inv:contains_item("queen", "bees:queen") then
|
||||||
|
|
||||||
clicker:set_hp(clicker:get_hp() - 4)
|
-- damage inside timer to stop death duplication glitch
|
||||||
|
minetest.after(0.1, function()
|
||||||
|
clicker:set_hp(clicker:get_hp() - 4)
|
||||||
|
end, clicker)
|
||||||
else
|
else
|
||||||
meta:set_int("agressive", 1)
|
meta:set_int("agressive", 1)
|
||||||
end
|
end
|
||||||
@ -509,7 +512,10 @@ minetest.register_node("bees:hive_artificial", {
|
|||||||
if meta:get_int("agressive") == 1
|
if meta:get_int("agressive") == 1
|
||||||
and inv:contains_item("queen", "bees:queen") then
|
and inv:contains_item("queen", "bees:queen") then
|
||||||
|
|
||||||
clicker:set_hp(clicker:get_hp() - 4)
|
-- damage inside timer to stop death duplication glitch
|
||||||
|
minetest.after(0.1, function()
|
||||||
|
clicker:set_hp(clicker:get_hp() - 4)
|
||||||
|
end, clicker)
|
||||||
else
|
else
|
||||||
meta:set_int("agressive", 1)
|
meta:set_int("agressive", 1)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user