Removed sector camera clamp / Added map edge padding / Turret sprite fix

This commit is contained in:
Anuken
2018-07-18 22:43:35 -04:00
parent 7ff4e5879d
commit 363bf7c552
15 changed files with 141 additions and 102 deletions

View File

@@ -63,7 +63,7 @@ public class NetworkIO{
Tile tile = world.tile(i);
stream.writeByte(tile.getFloorID());
stream.writeByte(tile.getWallID());
stream.writeByte(tile.getBlockID());
stream.writeByte(tile.getElevation());
if(tile.block() instanceof BlockPart){
@@ -78,13 +78,13 @@ public class NetworkIO{
if(tile.entity.cons != null) tile.entity.cons.write(stream);
tile.entity.write(stream);
}else if(tile.getWallID() == 0){
}else if(tile.block() == Blocks.air){
int consecutives = 0;
for(int j = i + 1; j < world.width() * world.height() && consecutives < 255; j++){
Tile nextTile = world.tile(j);
if(nextTile.getFloorID() != tile.getFloorID() || nextTile.getWallID() != 0 || nextTile.getElevation() != tile.getElevation()){
if(nextTile.getFloorID() != tile.getFloorID() || nextTile.block() != Blocks.air || nextTile.getElevation() != tile.getElevation()){
break;
}