Skip to content

Commit

Permalink
clamped wrong stuff (#1307)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaikRe authored Jul 17, 2024
1 parent 4f88c20 commit 1e197ee
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions crates/control/src/behavior/support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
};

Expand Down

0 comments on commit 1e197ee

Please sign in to comment.