Skip to content

Commit c1b2672

Browse files
committed
Fix increasing "placementOffsetGoalLine"
Offset was increased on each geometry processing on small field sizes
1 parent e6bbeed commit c1b2672

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/app/engine/consume_geometry.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ func (e *Engine) ProcessGeometry(data *vision.SSL_GeometryData) {
5454
newGeometry.PlacementOffsetDefenseArea-
5555
newGeometry.PlacementOffsetTouchLine < 0 {
5656
// move the offset further into the field, if the ball does not fit between defense area and touch line
57-
newGeometry.PlacementOffsetGoalLine += newGeometry.DefenseAreaDepth
57+
defaultPlacementOffsetGoalLine := e.gameConfig.DefaultGeometry[e.currentState.Division.Div()].PlacementOffsetGoalLine
58+
newGeometry.PlacementOffsetGoalLine = defaultPlacementOffsetGoalLine + newGeometry.DefenseAreaDepth
5859
}
5960

6061
e.stateMachine.Geometry = newGeometry

0 commit comments

Comments
 (0)