Skip to content

Commit 5337801

Browse files
committed
Update geometry when division is changed
Otherwise, some values that are not send in the geometry message are not changed based on division.
1 parent 2649fec commit 5337801

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

internal/app/statemachine/change_config.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ func (s *StateMachine) processChangeUpdateConfig(newState *state.State, change *
1010
log.Printf("Change division to %v", *change.Division)
1111
newState.Division = change.Division
1212
s.updateMaxBots(newState)
13+
s.Geometry = s.gameConfig.DefaultGeometry[change.Division.Div()]
14+
log.Println("Updated geometry to ", s.Geometry)
1315
}
1416
if change.FirstKickoffTeam != nil {
1517
log.Printf("Change first kickoff team to %v", *change.FirstKickoffTeam)

0 commit comments

Comments
 (0)