diff options
| author | metamuffin <metamuffin@disroot.org> | 2025-10-20 20:11:02 +0200 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2025-10-20 20:11:02 +0200 |
| commit | a52785f4869a09e05417f97aff1c0d5b19587463 (patch) | |
| tree | 9d288a969a6da19ddb2848ac18a22f9d3c1879b7 /server/bot/src/pathfinding.rs | |
| parent | f8d95d074c36ec35eee8def73b8d9f2b83c922cb (diff) | |
| download | hurrycurry-a52785f4869a09e05417f97aff1c0d5b19587463.tar hurrycurry-a52785f4869a09e05417f97aff1c0d5b19587463.tar.bz2 hurrycurry-a52785f4869a09e05417f97aff1c0d5b19587463.tar.zst | |
Refactor bot input to packet based
Diffstat (limited to 'server/bot/src/pathfinding.rs')
| -rw-r--r-- | server/bot/src/pathfinding.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/bot/src/pathfinding.rs b/server/bot/src/pathfinding.rs index e17ca80c..ec098495 100644 --- a/server/bot/src/pathfinding.rs +++ b/server/bot/src/pathfinding.rs @@ -31,6 +31,10 @@ pub struct Path { } impl Path { + pub const EMPTY: Path = Path { + seg_time: 0., + segments: Vec::new(), + }; pub fn next_direction(&mut self, position: Vec2, dt: f32) -> Vec2 { if let Some(next) = self.segments.last().copied() { trace!("next {next}"); |