From 1e197ee4b8baa9149df971d96fa9e117b61d227d Mon Sep 17 00:00:00 2001 From: MaikRe <87246463+MaikRe@users.noreply.github.com> Date: Wed, 17 Jul 2024 19:33:12 +0200 Subject: [PATCH] clamped wrong stuff (#1307) --- crates/control/src/behavior/support.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/crates/control/src/behavior/support.rs b/crates/control/src/behavior/support.rs index b80c6028c3..fb3903b433 100644 --- a/crates/control/src/behavior/support.rs +++ b/crates/control/src/behavior/support.rs @@ -84,16 +84,14 @@ fn support_pose( .filtered_game_controller_state .map(|filtered_game_controller_state| filtered_game_controller_state.game_state); let mut clamped_x = match filtered_game_state { - Some(FilteredGameState::Ready { .. }) => supporting_position - .x() - .min(maximum_x_in_ready_and_when_ball_is_not_free), - Some(FilteredGameState::Playing { + Some(FilteredGameState::Ready { .. }) + | Some(FilteredGameState::Playing { ball_is_free: false, kick_off: true, .. }) => supporting_position .x() - .clamp(maximum_x_in_ready_and_when_ball_is_not_free, maximum_x), + .min(maximum_x_in_ready_and_when_ball_is_not_free), _ => supporting_position.x().clamp(minimum_x, maximum_x), };