Fixed player names not displaying

This commit is contained in:
Anuken
2018-07-04 15:01:29 -04:00
parent 6ff44fddd0
commit 071d0fbbf7
3 changed files with 13 additions and 11 deletions

View File

@@ -191,11 +191,8 @@ public class Renderer extends RendererModule{
Graphics.clear(clearColor);
batch.setProjectionMatrix(camera.combined);
if(pixelate)
Graphics.surface(pixelSurface, false);
else
batch.begin();
Graphics.surface(pixelSurface, false);
drawPadding();
@@ -222,6 +219,7 @@ public class Renderer extends RendererModule{
Graphics.endShaders();
}
drawAllTeams(false);
blocks.skipLayer(Layer.turret);
@@ -236,18 +234,19 @@ public class Renderer extends RendererModule{
drawAndInterpolate(playerGroup, p -> true, Player::drawBuildRequests);
overlays.drawTop();
if(pixelate)
Graphics.flushSurface();
Graphics.flushSurface();
if(showPaths && debug) drawDebug();
drawAndInterpolate(playerGroup, p -> !p.isLocal && !p.isDead(), Player::drawName);
batch.end();
if(showFog){
fog.draw();
}
batch.begin();
drawAndInterpolate(playerGroup, p -> !p.isDead() && !p.isLocal, Player::drawName);
batch.end();
}
private void drawAllTeams(boolean flying){

View File

@@ -162,6 +162,11 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{
}
}
@Override
public boolean isValid() {
return super.isValid() && isAdded();
}
@Override
public Timer getTimer() {
return timer;

View File

@@ -123,14 +123,12 @@ public class FogRenderer implements Disposable{
Graphics.shader();
Graphics.begin();
Core.batch.draw(renderer.pixelSurface.texture(), px, py + vh, vw, -vh);
Graphics.end();
if(Core.batch instanceof ClipSpriteBatch){
((ClipSpriteBatch) Core.batch).enableClip(true);
}
}
public Texture getTexture(){