mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-09 20:29:06 +07:00
parent
2b17dbe390
commit
8704e14fd7
@ -445,11 +445,16 @@ public class NetClient implements ApplicationListener{
|
|||||||
|
|
||||||
for(int i = 0; i < amount; i++){
|
for(int i = 0; i < amount; i++){
|
||||||
int pos = input.readInt();
|
int pos = input.readInt();
|
||||||
|
short block = input.readShort();
|
||||||
Tile tile = world.tile(pos);
|
Tile tile = world.tile(pos);
|
||||||
if(tile == null || tile.build == null){
|
if(tile == null || tile.build == null){
|
||||||
Log.warn("Missing entity at @. Skipping block snapshot.", tile);
|
Log.warn("Missing entity at @. Skipping block snapshot.", tile);
|
||||||
break;
|
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());
|
tile.build.readAll(Reads.get(input), tile.build.version());
|
||||||
}
|
}
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
|
@ -824,6 +824,7 @@ public class NetServer implements ApplicationListener{
|
|||||||
sent ++;
|
sent ++;
|
||||||
|
|
||||||
dataStream.writeInt(entity.pos());
|
dataStream.writeInt(entity.pos());
|
||||||
|
dataStream.writeShort(entity.block.id);
|
||||||
entity.writeAll(Writes.get(dataStream));
|
entity.writeAll(Writes.get(dataStream));
|
||||||
|
|
||||||
if(syncStream.size() > maxSnapshotSize){
|
if(syncStream.size() > maxSnapshotSize){
|
||||||
|
@ -11,6 +11,7 @@ import arc.scene.ui.*;
|
|||||||
import arc.scene.ui.layout.*;
|
import arc.scene.ui.layout.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
|
import mindustry.*;
|
||||||
import mindustry.ai.types.*;
|
import mindustry.ai.types.*;
|
||||||
import mindustry.annotations.Annotations.*;
|
import mindustry.annotations.Annotations.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
@ -300,7 +301,7 @@ public class UnitType extends UnlockableContent{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(weapons.isEmpty()){
|
if(weapons.isEmpty()){
|
||||||
range = maxRange = 0f;
|
range = maxRange = miningRange;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mechStride < 0){
|
if(mechStride < 0){
|
||||||
|
@ -51,6 +51,9 @@ public class SStats implements SteamUserStatsCallback{
|
|||||||
stats.storeStats();
|
stats.storeStats();
|
||||||
}
|
}
|
||||||
}, statSavePeriod * 60, statSavePeriod * 60);
|
}, statSavePeriod * 60, statSavePeriod * 60);
|
||||||
|
|
||||||
|
if(Items.thorium.unlocked()) obtainThorium.complete();
|
||||||
|
if(Items.titanium.unlocked()) obtainTitanium.complete();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user