Fix gauges
This commit is contained in:
parent
947715fbe8
commit
97d3e6ba78
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue