@@ -445,11 +445,16 @@ public class NetClient implements ApplicationListener{
|
||||
|
||||
for(int i = 0; i < amount; i++){
|
||||
int pos = input.readInt();
|
||||
short block = input.readShort();
|
||||
Tile tile = world.tile(pos);
|
||||
if(tile == null || tile.build == null){
|
||||
Log.warn("Missing entity at @. Skipping block snapshot.", tile);
|
||||
break;
|
||||
}
|
||||
if(tile.build.block.id != block){
|
||||
Log.warn("Block ID mismatch at @: @ != @. Skipping block snapshot.", tile, tile.build.block.id, block);
|
||||
break;
|
||||
}
|
||||
tile.build.readAll(Reads.get(input), tile.build.version());
|
||||
}
|
||||
}catch(Exception e){
|
||||
|
||||
@@ -824,6 +824,7 @@ public class NetServer implements ApplicationListener{
|
||||
sent ++;
|
||||
|
||||
dataStream.writeInt(entity.pos());
|
||||
dataStream.writeShort(entity.block.id);
|
||||
entity.writeAll(Writes.get(dataStream));
|
||||
|
||||
if(syncStream.size() > maxSnapshotSize){
|
||||
|
||||
@@ -11,6 +11,7 @@ import arc.scene.ui.*;
|
||||
import arc.scene.ui.layout.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import mindustry.*;
|
||||
import mindustry.ai.types.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.content.*;
|
||||
@@ -300,7 +301,7 @@ public class UnitType extends UnlockableContent{
|
||||
}
|
||||
|
||||
if(weapons.isEmpty()){
|
||||
range = maxRange = 0f;
|
||||
range = maxRange = miningRange;
|
||||
}
|
||||
|
||||
if(mechStride < 0){
|
||||
|
||||
Reference in New Issue
Block a user