fix: polyline cannot be drawn if actualSize < 2

This commit is contained in:
Laureηt 2021-05-29 10:10:07 +02:00
parent 45b1bdd3a8
commit 0ece22dc85

View file

@ -72,7 +72,9 @@ public class Bow extends Actor {
if (aimAssist) {
Trajectory traj =
Arrow.computeTrajectory(angle, power, GameScreen.playerCurrent, 50, 0.01f);
shapes.polyline(traj.path, 0, traj.actualSize);
if (traj.actualSize > 2) {
shapes.polyline(traj.path, 0, traj.actualSize);
}
}
}
}