From 1fec0e3e2efd2897acd0231646e0bce80b78872b Mon Sep 17 00:00:00 2001 From: Wouters Dorian Date: Fri, 14 Aug 2015 12:55:55 +0200 Subject: [PATCH] Fix HUD not hiding correctly --- hud.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/hud.lua b/hud.lua index 39e39f0..742f637 100644 --- a/hud.lua +++ b/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