mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-01-23 16:30:19 +01:00
fix crash in mana when used hudbars mod
This commit is contained in:
parent
3920e10c1d
commit
16bd72149a
@ -205,7 +205,9 @@ end)
|
||||
|
||||
minetest.register_on_leaveplayer(function(player)
|
||||
local playername = player:get_player_name()
|
||||
mana.hud_remove(playername)
|
||||
if minetest.get_modpath("hudbars") == nil then
|
||||
player:hud_remove(mana.playerlist[playername].hudid)
|
||||
end
|
||||
mana.playerlist[playername] = nil
|
||||
end)
|
||||
|
||||
@ -295,11 +297,6 @@ else
|
||||
player:hud_change(mana.playerlist[playername].hudid, "number", mana.get(playername))
|
||||
player:hud_change(mana.playerlist[playername].hudid, "text", mana.manastring(playername))
|
||||
end
|
||||
|
||||
function mana.hud_remove(playername)
|
||||
local player = minetest.get_player_by_name(playername)
|
||||
player:hud_remove(mana.playerlist[playername].hudid)
|
||||
end
|
||||
end
|
||||
|
||||
--[===[
|
||||
|
Loading…
Reference in New Issue
Block a user