Skip to content

Commit

Permalink
Resolve "Attacker becomes supporter when slightly crashing into the b…
Browse files Browse the repository at this point in the history
…all"

Closes #1916

See merge request main/Sumatra!1869

sumatra-commit: 74bf1eef43132248fa7ea062c012609007b8cb7f
  • Loading branch information
Mk-arc authored and TIGERs GitLab committed Jul 8, 2024
1 parent 5da84e3 commit 238b208
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import edu.tigers.sumatra.drawable.DrawableCircle;
import edu.tigers.sumatra.drawable.DrawableLine;
import edu.tigers.sumatra.drawable.DrawablePlanarCurve;
import edu.tigers.sumatra.drawable.DrawablePoint;
import edu.tigers.sumatra.drawable.IDrawableShape;
import edu.tigers.sumatra.drawable.ShapeMap;
import edu.tigers.sumatra.drawable.animated.AnimatedCrosshair;
Expand Down Expand Up @@ -82,9 +81,6 @@ public void process(final WorldFrameWrapper wfw, final ShapeMap shapeMap)
ballCurve.setColor(Color.PINK);
shapeMap.get(EWpShapesLayer.BALL_PREDICTION).add(ballCurve);

wfw.getSimpleWorldFrame().getKickedBall().ifPresent(state -> shapeMap.get(EWpShapesLayer.BALL_PREDICTION)
.add(new DrawableArrow(state.getKickPos(), state.getKickVel().getXYVector().multiplyNew(100))
.setColor(Color.magenta)));
}

ball.getTrajectory().getTravelLinesRolling().forEach(rollLine -> {
Expand All @@ -97,7 +93,7 @@ public void process(final WorldFrameWrapper wfw, final ShapeMap shapeMap)
});

wfw.getSimpleWorldFrame().getKickedBall().ifPresent(kickedBall -> shapeMap.get(EWpShapesLayer.BALL_PREDICTION)
.add(new DrawablePoint(kickedBall.getKickPos(), Color.red)
.withSize(50)));
.add(new DrawableArrow(kickedBall.getKickPos(), kickedBall.getKickVel().getXYVector().multiplyNew(100))
.setColor(Color.magenta)));
}
}

0 comments on commit 238b208

Please sign in to comment.