diff --git a/tradedb.py b/tradedb.py index b248ff1a..78fe19b9 100644 --- a/tradedb.py +++ b/tradedb.py @@ -569,7 +569,8 @@ def genSystemsInRange(self, system, ly, includeSelf=False): (candidate.posY - sysY) ** 2 + (candidate.posZ - sysZ) ** 2 ) - cachedSystems[candidate] = dist = math.sqrt(distSq) + if distSq <= lySq: + cachedSystems[candidate] = math.sqrt(distSq) cache.probedLy = probedLy = ly