Skip to content

Commit 34680b1

Browse files
committed
Fix: Continue from stop if ball is within 1m to ball placement pos
Citing the rules: No ball placement is required if all of the following constraints are fulfilled: * The ball is closer than 1m to the designated position. * ...
1 parent 41a50a1 commit 34680b1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/app/engine/process_continue.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ func (e *Engine) readyToContinueFromStop() (issues []string) {
131131
}
132132
if e.currentState.PlacementPos != nil {
133133
ballToPlacementPosDist := e.currentState.PlacementPos.DistanceTo(e.gcState.TrackerStateGc.Ball.Pos.ToVector2())
134-
if ballToPlacementPosDist > e.gameConfig.BallPlacementTolerance {
135-
issues = append(issues, fmt.Sprintf("Ball is %.1fm (>%.1fm) away from placement pos",
136-
ballToPlacementPosDist, e.gameConfig.BallPlacementTolerance))
134+
if ballToPlacementPosDist > e.gameConfig.BallPlacementRequiredDistance {
135+
issues = append(issues, fmt.Sprintf("Ball is %.2fm (>%.2fm) away from placement pos",
136+
ballToPlacementPosDist, e.gameConfig.BallPlacementRequiredDistance))
137137
}
138138
}
139139
if !e.ballSteady() {

0 commit comments

Comments
 (0)