Run bossbars in minetest 5.1.1

This commit is contained in:
kay27 2022-01-24 02:45:39 +04:00
parent da9fa916e8
commit e291853c01
1 changed files with 2 additions and 2 deletions

View File

@ -124,12 +124,12 @@ minetest.register_globalstep(function(dtime)
local name = player:get_player_name()
local bars = mcl_bossbars.bars[name]
local huds = mcl_bossbars.huds[name]
table.sort(bars, function(a, b) return a.priority < b.priority end)
table.sort(bars or {}, function(a, b) return a.priority < b.priority end)
local huds_new = {}
local bars_new = {}
local i = 0
while #huds > 0 or #bars > 0 do
while huds and bars and (#huds > 0 or #bars > 0) do
local bar = table.remove(bars, 1)
local hud = table.remove(huds, 1)