From 47c834a809574468f6d37c6edae9e3fa4d08ceaf Mon Sep 17 00:00:00 2001 From: kay27 Date: Tue, 10 Nov 2020 11:25:35 +0400 Subject: [PATCH] Fix XP inditaction when the player dies --- mods/HUD/mcl_experience/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/HUD/mcl_experience/init.lua b/mods/HUD/mcl_experience/init.lua index 7ffa20bdf..0215e6d90 100644 --- a/mods/HUD/mcl_experience/init.lua +++ b/mods/HUD/mcl_experience/init.lua @@ -278,9 +278,9 @@ minetest.register_on_dieplayer(function(player) temp_pool = pool[name] xp_amount = temp_pool.xp - temp_pool.bar = 0 - temp_pool.level = 0 temp_pool.xp = 0 + temp_pool.level = 0 + temp_pool.bar, temp_pool.bar_step, temp_pool.xp_next_level = mcl_experience.xp_to_bar(temp_pool.xp, temp_pool.level) hud_manager.change_hud({player = player, hud_name = "xp_level", element = "text", data = tostring(temp_pool.level)}) hud_manager.change_hud({player = player, hud_name = "experience_bar", element = "number", data = math.floor(temp_pool.bar)})