Skip to content

Commit

Permalink
Fixed Anuken#9713
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuken committed Apr 6, 2024
1 parent 73423f2 commit 08c8ab0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/src/mindustry/graphics/Trail.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public void shorten(){
int count = (int)(counter += Time.delta);
counter -= count;

if(points.size + ((count - 1) * 3) > length * 3){
if(points.size + ((count - 1) * 3) > length * 3 && points.size > 0){
points.removeRange(0, Math.min(3 * count - 1, points.size - 1));
}
}
Expand All @@ -123,7 +123,7 @@ public void update(float x, float y, float width){

if(count > 0){
int toRemove = points.size + (count - 1 - length) * 3;
if(toRemove > 0){
if(toRemove > 0 && points.size > 0){
points.removeRange(0, Math.min(toRemove - 1, points.size - 1));
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ org.gradle.caching=true
#used for slow jitpack builds; TODO see if this actually works
org.gradle.internal.http.socketTimeout=100000
org.gradle.internal.http.connectionTimeout=100000
archash=4ea3d3b7e8
archash=6ad7aca01b

0 comments on commit 08c8ab0

Please sign in to comment.