Skip to content

Commit

Permalink
Freeze role assignment during free kick detection
Browse files Browse the repository at this point in the history
  • Loading branch information
ThagonDuarte committed Jan 29, 2025
1 parent f32c27a commit 68189d3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/control/src/role_assignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,14 @@ fn process_role_state_machine(
if let Some(SubState::PenaltyKick) = game_controller_state.sub_state {
return (current_role, false, None);
}
if let FilteredGameControllerState {
sub_state: Some(SubState::KickIn | SubState::PushingFreeKick),
kicking_team: None,
..
} = game_controller_state
{
return (current_role, false, None);
}
}

if primary_state != PrimaryState::Playing {
Expand Down

0 comments on commit 68189d3

Please sign in to comment.