File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,8 @@ func (e *Engine) processContinue() {
8484 }
8585
8686 if * e .currentState .Command .Type == state .Command_STOP &&
87- ! e .readyToContinueFromStop () {
87+ (e .currentState .NextCommand == nil ||
88+ ! e .readyToContinueFromStop ()) {
8889 return
8990 }
9091
@@ -120,8 +121,8 @@ func (e *Engine) robotPos(robotId *state.RobotId) *geom.Vector2 {
120121}
121122
122123func (e * Engine ) posInsideGoal (pos * geom.Vector2 ) bool {
123- forTeam := * e .currentState .Command .ForTeam
124- teamInfo := e .currentState .TeamState [forTeam .String ()]
124+ goalTeam := e .currentState .Command .ForTeam . Opposite ()
125+ teamInfo := e .currentState .TeamState [goalTeam .String ()]
125126 goalCenter := geom .GoalCenter (e .getGeometry (), * teamInfo .OnPositiveHalf )
126127 goalArea := geom .NewRectangleFromCenter (goalCenter , robotRadius * 2 , e .getGeometry ().GoalWidth )
127128 return goalArea .IsPointInside (pos )
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ func (r *Rectangle) MaxY() float64 {
5555
5656// MaxX returns the smallest y value
5757func (r * Rectangle ) MinY () float64 {
58- return r .center .Y64 () + r .yExtent / 2.0
58+ return r .center .Y64 () - r .yExtent / 2.0
5959}
6060
6161// IsPointInside returns true if the given point is inside the rectangle
You can’t perform that action at this time.
0 commit comments