mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-29 14:23:48 +01:00
Fix jukebox "Now playing" not disappearing
parent
326b0971f5
commit
1275af7903
@ -28,10 +28,11 @@ local function now_playing(player, track_id)
|
|||||||
local hud = active_huds[player:get_player_name()]
|
local hud = active_huds[player:get_player_name()]
|
||||||
local text = "Now playing: " .. recorddata[track_id][2] .. "—" .. recorddata[track_id][1]
|
local text = "Now playing: " .. recorddata[track_id][2] .. "—" .. recorddata[track_id][1]
|
||||||
|
|
||||||
|
local id
|
||||||
if hud ~= nil then
|
if hud ~= nil then
|
||||||
player:hud_change(active_huds[player:get_player_name()], "text", text)
|
player:hud_change(active_huds[player:get_player_name()], "text", text)
|
||||||
else
|
else
|
||||||
local id = player:hud_add({
|
id = player:hud_add({
|
||||||
hud_elem_type = "text",
|
hud_elem_type = "text",
|
||||||
position = { x=0.5, y=0.8 },
|
position = { x=0.5, y=0.8 },
|
||||||
offset = { x=0, y = 0 },
|
offset = { x=0, y = 0 },
|
||||||
|
Loading…
Reference in New Issue
Block a user