mirror of
https://github.com/MinetestForFun/quests.git
synced 2024-11-13 06:00:18 +01:00
Fix HUD not hiding correctly
This commit is contained in:
parent
90bc0e3ad7
commit
1fec0e3e2e
13
hud.lua
13
hud.lua
|
@ -52,14 +52,17 @@ function quests.hide_hud(playername)
|
|||
return
|
||||
end
|
||||
for _,quest in pairs(quests.hud[playername].list) do
|
||||
player:hud_remove(quest.id)
|
||||
if (quest.id_background ~= nil) then
|
||||
player:hud_remove(quest.id_background)
|
||||
if quest.text and quest.text.id then
|
||||
player:hud_remove(quest.text.id)
|
||||
end
|
||||
if (quest.id_bar ~= nil) then
|
||||
player:hud_remove(quest.id_bar)
|
||||
if quest.background and quest.background.id then
|
||||
player:hud_remove(quest.background.id)
|
||||
end
|
||||
if quest.bar and quest.bar.id then
|
||||
player:hud_remove(quest.bar.id)
|
||||
end
|
||||
end
|
||||
player:hud_remove(quests.hud[playername].header)
|
||||
quests.hud[playername].list = nil
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user