mirror of
https://github.com/pandorabox-io/locator.git
synced 2026-05-04 15:56:52 -06:00
Respect active toggle of beacons (#4)
This commit is contained in:
committed by
GitHub
parent
ad66a6bfdb
commit
2b45aa27e1
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user