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