summaryrefslogtreecommitdiff
path: root/server/bot/src/algos/test.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-08-15 20:26:15 +0200
committermetamuffin <metamuffin@disroot.org>2024-08-15 20:26:15 +0200
commita868f49b41c30daca83de86f982ffed431d3e891 (patch)
tree8d3c0f1242874517404e232ecb7a91fd2195e3a6 /server/bot/src/algos/test.rs
parent6323dbc7ce50a73875c4b473da5776b7cbf41cde (diff)
downloadhurrycurry-a868f49b41c30daca83de86f982ffed431d3e891.tar
hurrycurry-a868f49b41c30daca83de86f982ffed431d3e891.tar.bz2
hurrycurry-a868f49b41c30daca83de86f982ffed431d3e891.tar.zst
customers leave if they get stuck walking
Diffstat (limited to 'server/bot/src/algos/test.rs')
-rw-r--r--server/bot/src/algos/test.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/bot/src/algos/test.rs b/server/bot/src/algos/test.rs
index dee4cb88..a47befa9 100644
--- a/server/bot/src/algos/test.rs
+++ b/server/bot/src/algos/test.rs
@@ -29,14 +29,14 @@ pub struct Test {
}
impl BotAlgo for Test {
- fn tick(&mut self, me: PlayerID, game: &Game, _dt: f32) -> BotInput {
+ fn tick(&mut self, me: PlayerID, game: &Game, dt: f32) -> BotInput {
let Some(player) = game.players.get(&me) else {
return BotInput::default();
};
let pos = player.movement.position;
if let Some(path) = &mut self.path {
- let direction = path.next_direction(pos);
+ let direction = path.next_direction(pos, dt);
return BotInput {
direction,
boost: false,