Skip to content

Commit

Permalink
take all penalties from game controller state
Browse files Browse the repository at this point in the history
  • Loading branch information
MaikRe committed Oct 14, 2024
1 parent 1415a20 commit 8607729
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ impl TryFrom<RoboCupGameControlData> for GameControllerStateMessage {
message.playersPerTeam
);
}
let hulks_players = (0..message.playersPerTeam)
let hulks_players = (0..MAX_NUM_PLAYERS)
.map(|player_index| {
message.teams[hulks_team_index].players[player_index as usize].try_into()
})
Expand Down
2 changes: 1 addition & 1 deletion crates/types/src/players.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl From<TeamState> for Players<Option<Penalty>> {

for (i, player) in team_state.players.iter().enumerate() {
if i < MAX_NUM_PLAYERS as usize {
inner.insert(i, player.penalty);
inner.insert(i+1, player.penalty);
}
}

Expand Down

0 comments on commit 8607729

Please sign in to comment.