Update entrypointclient.lua

This commit is contained in:
2025-12-25 02:35:42 +00:00
parent beafcfd29f
commit 1383e0b5f0

View File

@@ -46,7 +46,7 @@ local function receive()
local _, _, channel, _, msg, distance = pullEvent("modem_message") local _, _, channel, _, msg, distance = pullEvent("modem_message")
if channel == 15125 then if channel == 15125 then
if msg.protocol == "entrypoint_advertise" then if msg.protocol == "entrypoint_advertise" then
if distance < canidate.distance then if distance < canidate.distance and distance > (msg.max_distance or 128) then
canidate.max_distance = msg.max_distance canidate.max_distance = msg.max_distance
canidate.id = msg.sender canidate.id = msg.sender
canidate.distance = distance canidate.distance = distance