From 2b45aa27e1090116de6d27c78e51f01d2d7c42ab Mon Sep 17 00:00:00 2001 From: Luke aka SwissalpS <161979+SwissalpS@users.noreply.github.com> Date: Tue, 31 Dec 2024 16:39:06 +0100 Subject: [PATCH] Respect active toggle of beacons (#4) --- radar.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radar.lua b/radar.lua index 452c0c9..70f98d9 100644 --- a/radar.lua +++ b/radar.lua @@ -32,9 +32,9 @@ local show_radar = function(pos, player, maxrange) hud_data = {} - for i,beacon in pairs(locator.beacons) do + for _, beacon in ipairs(locator.beacons) do local distance = vector.distance(pos, beacon.pos) - if distance < beacon.range and distance < maxrange then + if beacon.active and distance < beacon.range and distance < maxrange then -- in range local id = player:hud_add({ hud_elem_type = "waypoint",