diff --git a/core/src/io/anuke/mindustry/entities/type/Player.java b/core/src/io/anuke/mindustry/entities/type/Player.java index 2a515d5987..fe0d501c42 100644 --- a/core/src/io/anuke/mindustry/entities/type/Player.java +++ b/core/src/io/anuke/mindustry/entities/type/Player.java @@ -390,14 +390,14 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{ Draw.color(); font.setColor(color); font.draw(name, x, y + nameHeight, 0, Align.center, false); - } - if(isAdmin){ - float s = 3f; - Draw.color(color.r * 0.5f, color.g * 0.5f, color.b * 0.5f, 1f); - Draw.rect(Core.atlas.find("icon-admin-badge"), x + layout.width / 2f + 2 + 1, y + nameHeight - 1.5f, s, s); - Draw.color(color); - Draw.rect(Core.atlas.find("icon-admin-badge"), x + layout.width / 2f + 2 + 1, y + nameHeight - 1f, s, s); + if(isAdmin){ + float s = 3f; + Draw.color(color.r * 0.5f, color.g * 0.5f, color.b * 0.5f, 1f); + Draw.rect(Core.atlas.find("icon-admin-badge"), x + layout.width / 2f + 2 + 1, y + nameHeight - 1.5f, s, s); + Draw.color(color); + 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)){ diff --git a/core/src/io/anuke/mindustry/world/ItemBuffer.java b/core/src/io/anuke/mindustry/world/ItemBuffer.java index 3c80a87f54..9c058ce50c 100644 --- a/core/src/io/anuke/mindustry/world/ItemBuffer.java +++ b/core/src/io/anuke/mindustry/world/ItemBuffer.java @@ -1,7 +1,6 @@ package io.anuke.mindustry.world; -import io.anuke.arc.util.Pack; -import io.anuke.arc.util.Time; +import io.anuke.arc.util.*; import io.anuke.mindustry.type.Item; import java.io.*; @@ -78,5 +77,6 @@ public class ItemBuffer{ buffer[i] = l; } } + index = Math.min(index, length - 1); } }