Buffer fix

This commit is contained in:
Anuken
2019-09-24 22:25:49 -04:00
parent 03bb94da23
commit f1456190b5
2 changed files with 9 additions and 9 deletions

View File

@ -390,7 +390,6 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
Draw.color(); Draw.color();
font.setColor(color); font.setColor(color);
font.draw(name, x, y + nameHeight, 0, Align.center, false); font.draw(name, x, y + nameHeight, 0, Align.center, false);
}
if(isAdmin){ if(isAdmin){
float s = 3f; float s = 3f;
@ -399,6 +398,7 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
Draw.color(color); Draw.color(color);
Draw.rect(Core.atlas.find("icon-admin-badge"), x + layout.width / 2f + 2 + 1, y + nameHeight - 1f, s, s); Draw.rect(Core.atlas.find("icon-admin-badge"), x + layout.width / 2f + 2 + 1, y + nameHeight - 1f, s, s);
} }
}
if(Core.settings.getBool("playerchat") && ((textFadeTime > 0 && lastText != null) || isTyping)){ if(Core.settings.getBool("playerchat") && ((textFadeTime > 0 && lastText != null) || isTyping)){
String text = textFadeTime <= 0 || lastText == null ? "[LIGHT_GRAY]" + Strings.animated(Time.time(), 4, 15f, ".") : lastText; String text = textFadeTime <= 0 || lastText == null ? "[LIGHT_GRAY]" + Strings.animated(Time.time(), 4, 15f, ".") : lastText;

View File

@ -1,7 +1,6 @@
package io.anuke.mindustry.world; package io.anuke.mindustry.world;
import io.anuke.arc.util.Pack; import io.anuke.arc.util.*;
import io.anuke.arc.util.Time;
import io.anuke.mindustry.type.Item; import io.anuke.mindustry.type.Item;
import java.io.*; import java.io.*;
@ -78,5 +77,6 @@ public class ItemBuffer{
buffer[i] = l; buffer[i] = l;
} }
} }
index = Math.min(index, length - 1);
} }
} }