Fixed trail not shortening

This commit is contained in:
Anuken 2024-05-11 13:35:26 -04:00
parent bd610b6925
commit 328ba21ceb

View File

@ -106,9 +106,9 @@ public class Trail{
int count = (int)(counter += Time.delta);
counter -= count;
if(points.size + ((count - 1) * 3) > length * 3 && points.size > 0){
points.removeRange(0, Math.min(3 * count - 1, points.size - 1));
}
if(count > 0 && points.size > 0){
points.removeRange(0, Math.min(count * 3 - 1, points.size - 1));
}
}
/** Adds a new point to the trail at intervals. */