Fix too many teleports being considered

master
Wuzzy 2020-09-08 19:21:16 +02:00
parent 8e6066b58f
commit cc248356f6
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ function teleports:find_nearby(pos, count)
local EachTeleport = teleports.teleports[i]
if not vector.equals(EachTeleport.pos, pos) and vector.distance(EachTeleport.pos, pos) < TELEPORT_MAX_DIST then
table.insert(nearby, EachTeleport)
if #nearby>count then
if #nearby>=count then
break
end
end