Begin port to 26.3: movement

This commit is contained in:
Tanner
2026-11-03 22:48:15 +00:00
parent 891f14b988
commit 59c76471f2
23 changed files with 30692 additions and 478 deletions
+4 -5
View File
@@ -121,7 +121,7 @@ class Pathfinder(AStar):
def __init__(self, g):
self.g = g
self.chunks = g.chunks
self.start_time = time.time()
self.start_time = time.monotonic()
@functools.lru_cache(maxsize=BLOCK_CACHE_SIZE)
def bair(self, p):
@@ -267,6 +267,9 @@ class Pathfinder(AStar):
return True
def neighbors(self, node):
if time.monotonic() - self.start_time > 2.0:
raise AStarTimeout
results = []
if self.g.crawling:
@@ -296,10 +299,6 @@ class Pathfinder(AStar):
if self.check_parkour(node, offset):
results.append(utils.padd(node, offset))
if not results:
if time.time() - self.start_time > 2.0:
raise(AStarTimeout)
return results
def distance_between(self, n1, n2):