Crash fix / Input tweak

This commit is contained in:
Anuken
2019-03-22 00:16:09 -04:00
parent ee06e620c6
commit c7d34049fa
21 changed files with 23 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ public class EditorTile extends Tile{
@Override
public void setBlock(Block type){
Block previous = block();
Block previous = wall == null ? Blocks.air : wall;
if(previous == type) return;
super.setBlock(type);
op(TileOp.get(x, y, (byte)OpType.block.ordinal(), previous.id, type.id));

View File

@@ -401,6 +401,7 @@ public class MobileInput extends InputHandler implements GestureListener{
}
drawPlace(l.x, l.y, block, l.rotation, prevX - l.x, prevY - l.y, prevRotation);
rotation = l.rotation;
prevX = l.x;
prevY = l.y;
prevRotation = l.rotation;