forked from MineClone5/MineClone5
Run bossbars in minetest 5.1.1
This commit is contained in:
parent
da9fa916e8
commit
e291853c01
|
@ -124,12 +124,12 @@ minetest.register_globalstep(function(dtime)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
local bars = mcl_bossbars.bars[name]
|
local bars = mcl_bossbars.bars[name]
|
||||||
local huds = mcl_bossbars.huds[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 huds_new = {}
|
||||||
local bars_new = {}
|
local bars_new = {}
|
||||||
local i = 0
|
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 bar = table.remove(bars, 1)
|
||||||
local hud = table.remove(huds, 1)
|
local hud = table.remove(huds, 1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue