diff options
| author | metamuffin <metamuffin@disroot.org> | 2025-12-18 22:49:15 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2025-12-18 22:49:18 +0100 |
| commit | cf3d5d44166e7214700b73d657aa10018167ae0c (patch) | |
| tree | 9b74ed9e719b44bc8f8d312cdf4bb83651b20983 /server/bot/src/step.rs | |
| parent | 6832af5ee35b9d16668e1d34f191715f3755679f (diff) | |
| download | hurrycurry-cf3d5d44166e7214700b73d657aa10018167ae0c.tar hurrycurry-cf3d5d44166e7214700b73d657aa10018167ae0c.tar.bz2 hurrycurry-cf3d5d44166e7214700b73d657aa10018167ae0c.tar.zst | |
only send movement packets if changes; bots send less inputs
Diffstat (limited to 'server/bot/src/step.rs')
| -rw-r--r-- | server/bot/src/step.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/server/bot/src/step.rs b/server/bot/src/step.rs index 6031439f..75e5d427 100644 --- a/server/bot/src/step.rs +++ b/server/bot/src/step.rs @@ -144,17 +144,9 @@ impl StepState { .map(|p| p.movement.position) .unwrap_or_default(); - let dir = self.path.next_direction(position, dt); - #[cfg(feature = "debug_events")] out.push(PacketS::Debug(self.path.debug(self.me))); - - out.push(PacketS::Movement { - player: self.me, - dir, - boost: self.path.is_stuck(0.5), - pos: None, - }); + self.path.update(out, self.me, position, dt, 1., true); } } } |