Respect active toggle of beacons (#4)

This commit is contained in:
Luke aka SwissalpS
2024-12-31 16:39:06 +01:00
committed by GitHub
parent ad66a6bfdb
commit 2b45aa27e1
+2 -2
View File
@@ -32,9 +32,9 @@ local show_radar = function(pos, player, maxrange)
hud_data = {} hud_data = {}
for i,beacon in pairs(locator.beacons) do for _, beacon in ipairs(locator.beacons) do
local distance = vector.distance(pos, beacon.pos) 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 -- in range
local id = player:hud_add({ local id = player:hud_add({
hud_elem_type = "waypoint", hud_elem_type = "waypoint",