Improve pathfinding

This commit is contained in:
2020-10-12 23:25:26 -06:00
parent fa9d597483
commit 83132ab2bb
3 changed files with 7 additions and 29 deletions
+3 -2
View File
@@ -224,8 +224,8 @@ class Game:
solution = path.Pathfinder(self.g.chunks).astar(utils.pint(self.g.pos), utils.pint(self.g.goal))
if solution:
solution = list(solution)
self.g.path = solution
self.g.job.state = self.g.job.stop
#self.g.path = solution
#self.g.job.state = self.g.job.stop
print(len(solution))
print(solution)
print(round(time.time() - start, 3), 'seconds')
@@ -550,6 +550,7 @@ class Game:
if entry.value.item_id in items.GAPPLE_ID:
self.g.chat.send('gapple found: ' + str(current_chest)[1:-1])
print('gapple found:', str(current_chest)[1:-1])
def handle_spawn_living(self, packet):