From c94ece5f5071d4d9fec46daa59db008aa3f6cf32 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 19 Sep 2024 18:00:11 +0200 Subject: untested customer collision --- server/bot/src/pathfinding.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'server/bot/src/pathfinding.rs') diff --git a/server/bot/src/pathfinding.rs b/server/bot/src/pathfinding.rs index 593b5900..96d6b37a 100644 --- a/server/bot/src/pathfinding.rs +++ b/server/bot/src/pathfinding.rs @@ -48,6 +48,9 @@ impl Path { pub fn is_stuck(&self) -> bool { self.seg_time > 5. } + pub fn remaining_segments(&self) -> usize { + self.segments.len() + } } pub fn find_path_to_neighbour(walkable: &HashSet, from: IVec2, to: IVec2) -> Option { -- cgit v1.2.3-70-g09d2