Fix too many teleports being considered
parent
8e6066b58f
commit
cc248356f6
2
init.lua
2
init.lua
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue