Fix gauges

This commit is contained in:
rubenwardy 2019-02-03 04:26:02 +00:00
parent 947715fbe8
commit 97d3e6ba78

View file

@ -49,8 +49,9 @@ function gauges.add_HP_gauge(name)
if player then
local pos = player:get_pos()
local ent = minetest.add_entity(pos, "gauges:hp_bar")
assert(ent)
if ent ~= nil then
ent:set_attach(player, "", {x = 0, y = 9, z = 0}, {x = 0, y = 0, z = 0})
ent:set_attach(player, "", {x = 0, y = 19, z = 0}, {x = 0, y = 0, z = 0})
ent = ent:get_luaentity()
ent.wielder = player:get_player_name()
end