Cleanup
This commit is contained in:
@@ -279,10 +279,7 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw(){
|
public void draw(){
|
||||||
if(unit != null && unit.inFogTo(Vars.player.team())) return;
|
if(unit == null || name == null || unit.inFogTo(Vars.player.team())) return;
|
||||||
|
|
||||||
//??????
|
|
||||||
if(name == null) return;
|
|
||||||
|
|
||||||
Draw.z(Layer.playerName);
|
Draw.z(Layer.playerName);
|
||||||
float z = Drawf.text();
|
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));
|
font.getData().setScale(0.25f / Scl.scl(1f));
|
||||||
layout.setText(font, name);
|
layout.setText(font, name);
|
||||||
|
|
||||||
if(!isLocal() && unit != null){
|
if(!isLocal()){
|
||||||
Draw.color(0f, 0f, 0f, 0.3f);
|
Draw.color(0f, 0f, 0f, 0.3f);
|
||||||
Fill.rect(unit.x, unit.y + nameHeight - layout.height / 2, layout.width + 2, layout.height + 3);
|
Fill.rect(unit.x, unit.y + nameHeight - layout.height / 2, layout.width + 2, layout.height + 3);
|
||||||
Draw.color();
|
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;
|
String text = textFadeTime <= 0 || lastText == null ? "[lightgray]" + Strings.animated(Time.time, 4, 15f, ".") : lastText;
|
||||||
float width = 100f;
|
float width = 100f;
|
||||||
float visualFadeTime = 1f - Mathf.curve(1f - textFadeTime, 0.9f);
|
float visualFadeTime = 1f - Mathf.curve(1f - textFadeTime, 0.9f);
|
||||||
|
|||||||
Reference in New Issue
Block a user