Added if condition to if player has the HUD before to remove it
This commit is contained in:
parent
56d406c464
commit
1ceef26e35
@ -21,8 +21,10 @@ end
|
||||
local function sumo_remove_controls_hud(p_name)
|
||||
player = minetest.get_player_by_name(p_name)
|
||||
if not player then return end
|
||||
player:hud_remove(huds[p_name].controls)
|
||||
-- huds[p_name].controls = nil
|
||||
if huds[p_name] then
|
||||
player:hud_remove(huds[p_name].controls)
|
||||
huds[p_name].controls = nil
|
||||
end
|
||||
end
|
||||
|
||||
local function sumo_set_attribute_lives(arena, pl_name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user