Skip to content

Commit

Permalink
Also reset geometry after game started
Browse files Browse the repository at this point in the history
  • Loading branch information
g3force committed Jun 22, 2021
1 parent 8811e71 commit 4019524
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/simctl/handler_geometry.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ func (r *GeometryHandler) loadGeometry() {
}

func (r *GeometryHandler) handleGeometry() {
if *r.c.lastRefereeMsg.Stage != referee.Referee_NORMAL_FIRST_HALF_PRE {
// Only before the game starts
if *r.c.lastRefereeMsg.Command != referee.Referee_HALT {
// Only during HALT
return
}

Expand All @@ -57,7 +57,7 @@ func (r *GeometryHandler) handleGeometry() {
return
}

maxBots := *r.c.lastRefereeMsg.Yellow.MaxAllowedBots
maxBots := int(*r.c.lastRefereeMsg.Yellow.MaxAllowedBots) + len(r.c.lastRefereeMsg.Yellow.YellowCardTimes)
var geometry *vision.SSL_GeometryData
if maxBots == 6 {
geometry = r.geometryDivB
Expand Down

0 comments on commit 4019524

Please sign in to comment.