Netcode and block placedOffset cleanup

This commit is contained in:
Anuken
2018-01-26 14:49:36 -05:00
parent c0a9cfc6b2
commit 3b4ebff349
20 changed files with 100 additions and 168 deletions

View File

@@ -42,7 +42,7 @@ public class BlockConfigFragment implements Fragment {
table.update(()->{
table.setOrigin(Align.center);
Vector2 pos = Graphics.screen(tile.worldx() + tile.block().getPlaceOffset().x, tile.worldy() + tile.block().getPlaceOffset().y);
Vector2 pos = Graphics.screen(tile.drawx(), tile.drawy());
table.setPosition(pos.x, pos.y, Align.center);
if(configTile == null || configTile.block() == Blocks.air){
hideConfig();

View File

@@ -95,7 +95,7 @@ public class HudFragment implements Fragment{
visible(() -> !GameState.is(State.menu));
Label fps = new Label(() -> (Settings.getBool("fps") ? (Gdx.graphics.getFramesPerSecond() + " FPS") +
(Net.active() ? " / Ping: " + Net.getPing() : "") : ""));
(Net.active() && !Vars.gwt ? " / Ping: " + Net.getPing() : "") : ""));
row();
add(fps).size(-1);