mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 10:31:06 +01:00
Revert "Fix XP bar overflow if trying to go over XP limit", please see https://git.minetest.land/MineClone2/MineClone2/issues/1261
This reverts commit f6f2037e6a
.
This commit is contained in:
parent
95111e1d8d
commit
f3fb80200d
1 changed files with 1 additions and 1 deletions
|
@ -312,7 +312,7 @@ function mcl_experience.add_experience(player, experience)
|
|||
temp_pool.xp = math.min(math.max(temp_pool.xp + experience, 0), max_xp)
|
||||
|
||||
if (temp_pool.xp < temp_pool.xp_next_level) and (temp_pool.xp >= old_xp) then
|
||||
temp_pool.bar = mcl_experience.xp_to_bar(temp_pool.xp, temp_pool.level)
|
||||
temp_pool.bar = temp_pool.bar + temp_pool.bar_step * experience
|
||||
else
|
||||
temp_pool.level = mcl_experience.xp_to_level(temp_pool.xp)
|
||||
temp_pool.bar, temp_pool.bar_step, temp_pool.xp_next_level = mcl_experience.xp_to_bar(temp_pool.xp, temp_pool.level)
|
||||
|
|
Loading…
Reference in a new issue