Skip to content

Commit

Permalink
Fixed #9728
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuken committed Apr 8, 2024
1 parent e0363ac commit 6b72602
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/src/mindustry/graphics/Trail.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void draw(Color color, float width){
y2 = items[i + 4];
w2 = items[i + 5];

if(i == 0){
if(i == 0 && points.size >= (length - 1) * 3){
x1 = Mathf.lerp(x1, x2, counter);
y1 = Mathf.lerp(y1, y2, counter);
w1 = Mathf.lerp(w1, w2, counter);
Expand Down
7 changes: 4 additions & 3 deletions core/src/mindustry/world/blocks/ConstructBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ public class ConstructBuild extends Building{
public boolean wasConstructing, activeDeconstruct;
public float constructColor;

private float[] accumulator;
private float[] totalAccumulator;
private int[] itemsLeft;
private @Nullable float[] accumulator;
private @Nullable float[] totalAccumulator;
private @Nullable int[] itemsLeft;

@Override
public String getDisplayName(){
Expand Down Expand Up @@ -480,6 +480,7 @@ public void read(Reads read, byte revision){
if(acsize != -1){
accumulator = new float[acsize];
totalAccumulator = new float[acsize];
itemsLeft = new int[acsize];
for(int i = 0; i < acsize; i++){
accumulator[i] = read.f();
totalAccumulator[i] = read.f();
Expand Down

0 comments on commit 6b72602

Please sign in to comment.