aboutsummaryrefslogtreecommitdiff
path: root/server/bot/src/pathfinding.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-10-20 20:11:02 +0200
committermetamuffin <metamuffin@disroot.org>2025-10-20 20:11:02 +0200
commita52785f4869a09e05417f97aff1c0d5b19587463 (patch)
tree9d288a969a6da19ddb2848ac18a22f9d3c1879b7 /server/bot/src/pathfinding.rs
parentf8d95d074c36ec35eee8def73b8d9f2b83c922cb (diff)
downloadhurrycurry-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.rs4
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}");