mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-13 11:29:48 +07:00
Fixed server connect crash
This commit is contained in:
parent
56ae47cd8d
commit
99e54cc214
@ -482,7 +482,7 @@ public class NetServer extends Module{
|
||||
|
||||
//check for syncable groups
|
||||
for(EntityGroup<?> group : Entities.getAllGroups()){
|
||||
//TODO range-check sync positions to optimize?
|
||||
//TODO screen-check sync positions to optimize?
|
||||
if(group.isEmpty() || !(group.all().get(0) instanceof SyncTrait)) continue;
|
||||
|
||||
//make sure mapping is enabled for this group
|
||||
|
@ -121,7 +121,7 @@ public class NetworkIO{
|
||||
//write team data
|
||||
for(Team team : Team.all){
|
||||
TeamData data = state.teams.get(team);
|
||||
stream.writeByte(data.team.ordinal());
|
||||
stream.writeByte(team.ordinal());
|
||||
|
||||
stream.writeByte(data.enemies.size());
|
||||
for(Team enemy : data.enemies){
|
||||
@ -173,8 +173,6 @@ public class NetworkIO{
|
||||
int wave = stream.readInt();
|
||||
float wavetime = stream.readFloat();
|
||||
|
||||
boolean friendlyfire = stream.readBoolean();
|
||||
|
||||
state.wave = wave;
|
||||
state.wavetime = wavetime;
|
||||
state.mode = GameMode.values()[mode];
|
||||
|
@ -232,7 +232,7 @@ public class JoinDialog extends FloatingDialog{
|
||||
button.update(() -> button.getStyle().imageUpColor = player.color);
|
||||
}).width(w).height(70f).pad(4);
|
||||
content().row();
|
||||
content().add(pane).width(w + 38).pad(0).padRight(22);
|
||||
content().add(pane).width(w + 38).pad(0);
|
||||
content().row();
|
||||
content().addCenteredImageTextButton("$text.server.add", "icon-add", "clear", 14 * 3, () -> {
|
||||
renaming = null;
|
||||
|
@ -123,7 +123,7 @@ public class ServerControl extends Module{
|
||||
play(true, () -> world.loadMap(fmap));
|
||||
}
|
||||
}else{
|
||||
Call.onInfoMessage("Sector has been lost.\nRe-deploying in " + roundExtraTime + " seconds.");
|
||||
Call.onInfoMessage("[SCARLET]Sector has been lost.[]\nRe-deploying in " + roundExtraTime + " seconds.");
|
||||
if(gameOvers >= 2){
|
||||
Settings.putInt("sector_y", Settings.getInt("sector_y") < 0 ? Settings.getInt("sector_y") + 1 : Settings.getInt("sector_y") - 1);
|
||||
Settings.save();
|
||||
|
Loading…
Reference in New Issue
Block a user