mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-15 12:24:28 +07:00
Fixed trail not shortening
This commit is contained in:
parent
bd610b6925
commit
328ba21ceb
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user