diff options
author | metamuffin <metamuffin@disroot.org> | 2024-09-19 18:00:11 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-09-19 18:00:43 +0200 |
commit | c94ece5f5071d4d9fec46daa59db008aa3f6cf32 (patch) | |
tree | 9ca4d621a04d84a7e50b52cdb617ef3fc65646cd /server/bot/src/pathfinding.rs | |
parent | 3aff746f7960a8372ba4624d214dc1ae39632b36 (diff) | |
download | hurrycurry-c94ece5f5071d4d9fec46daa59db008aa3f6cf32.tar hurrycurry-c94ece5f5071d4d9fec46daa59db008aa3f6cf32.tar.bz2 hurrycurry-c94ece5f5071d4d9fec46daa59db008aa3f6cf32.tar.zst |
untested customer collision
Diffstat (limited to 'server/bot/src/pathfinding.rs')
-rw-r--r-- | server/bot/src/pathfinding.rs | 3 |
1 files changed, 3 insertions, 0 deletions
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<IVec2>, from: IVec2, to: IVec2) -> Option<Path> { |