This commit is contained in:
Anuken
2024-07-23 07:26:17 -04:00
parent 6e5b1e81ae
commit 995014cbe4

View File

@@ -279,10 +279,7 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
@Override
public void draw(){
if(unit != null && unit.inFogTo(Vars.player.team())) return;
//??????
if(name == null) return;
if(unit == null || name == null || unit.inFogTo(Vars.player.team())) return;
Draw.z(Layer.playerName);
float z = Drawf.text();
@@ -297,7 +294,7 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
font.getData().setScale(0.25f / Scl.scl(1f));
layout.setText(font, name);
if(!isLocal() && unit != null){
if(!isLocal()){
Draw.color(0f, 0f, 0f, 0.3f);
Fill.rect(unit.x, unit.y + nameHeight - layout.height / 2, layout.width + 2, layout.height + 3);
Draw.color();
@@ -313,7 +310,7 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
}
}
if(unit != null && Core.settings.getBool("playerchat") && ((textFadeTime > 0 && lastText != null) || typing)){
if(Core.settings.getBool("playerchat") && ((textFadeTime > 0 && lastText != null) || typing)){
String text = textFadeTime <= 0 || lastText == null ? "[lightgray]" + Strings.animated(Time.time, 4, 15f, ".") : lastText;
float width = 100f;
float visualFadeTime = 1f - Mathf.curve(1f - textFadeTime, 0.9f);