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() {
84
84
}
85
85
86
86
if * e .currentState .Command .Type == state .Command_STOP &&
87
- ! e .readyToContinueFromStop () {
87
+ (e .currentState .NextCommand == nil ||
88
+ ! e .readyToContinueFromStop ()) {
88
89
return
89
90
}
90
91
@@ -120,8 +121,8 @@ func (e *Engine) robotPos(robotId *state.RobotId) *geom.Vector2 {
120
121
}
121
122
122
123
func (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 ()]
125
126
goalCenter := geom .GoalCenter (e .getGeometry (), * teamInfo .OnPositiveHalf )
126
127
goalArea := geom .NewRectangleFromCenter (goalCenter , robotRadius * 2 , e .getGeometry ().GoalWidth )
127
128
return goalArea .IsPointInside (pos )
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ func (r *Rectangle) MaxY() float64 {
55
55
56
56
// MaxX returns the smallest y value
57
57
func (r * Rectangle ) MinY () float64 {
58
- return r .center .Y64 () + r .yExtent / 2.0
58
+ return r .center .Y64 () - r .yExtent / 2.0
59
59
}
60
60
61
61
// IsPointInside returns true if the given point is inside the rectangle
You can’t perform that action at this time.
0 commit comments