Aaron Suen ff57c0aaba Replace suicide command with stuck command.
It does something similar, though it doesn't send you back to
spawn, just "phase shifts" nearby.
2019-03-11 23:00:42 -04:00

14 lines
366 B
Lua

-- LUALOCALS < ---------------------------------------------------------
local minetest
= minetest
-- LUALOCALS > ---------------------------------------------------------
minetest.register_on_player_hpchange(function(player, hp)
local t = player:get_hp()
if hp + t <= 0 then
hp = 1 - t
player:set_attribute("dhp", "-1")
end
return hp
end, true)