From 238b2080aa04ec47297c73a6f1bb385286dbce96 Mon Sep 17 00:00:00 2001 From: MarkG Date: Mon, 8 Jul 2024 13:12:01 +0000 Subject: [PATCH] Resolve "Attacker becomes supporter when slightly crashing into the ball" Closes #1916 See merge request main/Sumatra!1869 sumatra-commit: 74bf1eef43132248fa7ea062c012609007b8cb7f --- .../main/java/edu/tigers/sumatra/wp/vis/BallVisCalc.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/moduli-wp/src/main/java/edu/tigers/sumatra/wp/vis/BallVisCalc.java b/modules/moduli-wp/src/main/java/edu/tigers/sumatra/wp/vis/BallVisCalc.java index 73c19d04..372a1f5c 100644 --- a/modules/moduli-wp/src/main/java/edu/tigers/sumatra/wp/vis/BallVisCalc.java +++ b/modules/moduli-wp/src/main/java/edu/tigers/sumatra/wp/vis/BallVisCalc.java @@ -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; @@ -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 -> { @@ -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))); } }