1
0
Fork 0

Fix wielded item text overlapping with HUD

This commit is contained in:
Wuzzy 2020-11-12 12:30:00 +01:00
parent 271cdbcf03
commit 41a1a3167d
1 changed files with 4 additions and 0 deletions

View File

@ -7,6 +7,7 @@ local dtimes = {}
local dlimit = 3 -- HUD element will be hidden after this many seconds
local hudbars_mod = minetest.get_modpath("hudbars")
local xp_mod = minetest.get_modpath("mcl_experience")
local function set_hud(player)
if not player:is_player() then return end
@ -28,6 +29,9 @@ local function set_hud(player)
local vmargin = tonumber(minetest.settings:get("hudbars_vmargin")) or 28
off.y = -76 - vmargin*rows
end
if xp_mod then
off.y = off.y - 25
end
-- Dirty trick to avoid collision with Minetest's status text (e.g. “Volume changed to 0%”)
if off.y >= -167 and off.y <= -156 then