mirror of
https://github.com/minetest-mods/item_drop.git
synced 2024-12-22 22:02:26 +01:00
Dont pick up items when dead
This commit is contained in:
parent
a41ddb6705
commit
e0c61c2f77
2
init.lua
2
init.lua
@ -1,5 +1,6 @@
|
||||
minetest.register_globalstep(function(dtime)
|
||||
for _,player in ipairs(minetest.get_connected_players()) do
|
||||
if player:get_hp() > 0 or not minetest.setting_getbool("enable_damage") then
|
||||
local pos = player:getpos()
|
||||
pos.y = pos.y+0.5
|
||||
local inv = player:get_inventory()
|
||||
@ -56,6 +57,7 @@ minetest.register_globalstep(function(dtime)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
function minetest.handle_node_drops(pos, drops, digger)
|
||||
|
Loading…
Reference in New Issue
Block a user