Fixed fog not clearing, movement bug, items stuck in blocks

This commit is contained in:
Anuken
2018-06-27 11:57:37 -04:00
parent 8b17972b11
commit 5cefecced8
10 changed files with 40 additions and 24 deletions

View File

@@ -34,6 +34,7 @@ public class FogRenderer implements Disposable{
Events.on(WorldLoadGraphicsEvent.class, () -> {
dispose();
buffer = new FrameBuffer(Format.RGBA8888, world.width(), world.height(), false);
changeQueue.clear();
//clear buffer to black
buffer.begin();
@@ -101,6 +102,8 @@ public class FogRenderer implements Disposable{
Fill.circle(tile.drawx(), tile.drawy(), tile.block().viewRange);
}
changeQueue.clear();
EntityDraw.setClip(true);
Graphics.end();
buffer.end();

View File

@@ -176,8 +176,8 @@ public class OverlayRenderer {
float y = unit.y;
if(unit == players[0] && players.length == 1 && snapCamera) {
x = (int)x;
y = (int)y;
x = (int)(x + 0.0001f);
y = (int)(y + 0.0001f);
}
drawEncloser(x, y - 8f, 2f);