Another fix

This commit is contained in:
Jean-Patrick Guerrero 2021-04-12 00:38:24 +02:00
parent 1b71a85f53
commit a0c0a8bad7

View File

@ -2991,19 +2991,17 @@ local function init_waypoints(player)
data.waypoints = data.waypoints or {} data.waypoints = data.waypoints or {}
for _, v in ipairs(data.waypoints) do for _, v in ipairs(data.waypoints) do
local id = player:hud_add { if not v.hide then
hud_elem_type = "waypoint", local id = player:hud_add {
name = v.name, hud_elem_type = "waypoint",
text = " m", name = v.name,
world_pos = v.pos, text = " m",
number = v.color, world_pos = v.pos,
z_index = -300, number = v.color,
} z_index = -300,
}
v.id = id v.id = id
if v.hide then
player:hud_remove(id)
end end
end end
end end