mirror of
https://github.com/minetest-mods/i3.git
synced 2025-01-13 19:50:31 +01:00
Another fix
This commit is contained in:
parent
1b71a85f53
commit
a0c0a8bad7
22
init.lua
22
init.lua
@ -2991,19 +2991,17 @@ local function init_waypoints(player)
|
||||
data.waypoints = data.waypoints or {}
|
||||
|
||||
for _, v in ipairs(data.waypoints) do
|
||||
local id = player:hud_add {
|
||||
hud_elem_type = "waypoint",
|
||||
name = v.name,
|
||||
text = " m",
|
||||
world_pos = v.pos,
|
||||
number = v.color,
|
||||
z_index = -300,
|
||||
}
|
||||
if not v.hide then
|
||||
local id = player:hud_add {
|
||||
hud_elem_type = "waypoint",
|
||||
name = v.name,
|
||||
text = " m",
|
||||
world_pos = v.pos,
|
||||
number = v.color,
|
||||
z_index = -300,
|
||||
}
|
||||
|
||||
v.id = id
|
||||
|
||||
if v.hide then
|
||||
player:hud_remove(id)
|
||||
v.id = id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user