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)
|
local function sumo_remove_controls_hud(p_name)
|
||||||
player = minetest.get_player_by_name(p_name)
|
player = minetest.get_player_by_name(p_name)
|
||||||
if not player then return end
|
if not player then return end
|
||||||
player:hud_remove(huds[p_name].controls)
|
if huds[p_name] then
|
||||||
-- huds[p_name].controls = nil
|
player:hud_remove(huds[p_name].controls)
|
||||||
|
huds[p_name].controls = nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function sumo_set_attribute_lives(arena, pl_name)
|
local function sumo_set_attribute_lives(arena, pl_name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user