Improved LAN discovery-- fixed #55
This commit is contained in:
@@ -3,9 +3,11 @@ package io.anuke.mindustry.net;
|
||||
public class Address {
|
||||
public final String name;
|
||||
public final String address;
|
||||
public final int players;
|
||||
|
||||
public Address(String name, String address){
|
||||
public Address(String name, String address, int players){
|
||||
this.name = name;
|
||||
this.address = address;
|
||||
this.players = players;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ public class Net{
|
||||
private static IntMap<StreamBuilder> streams = new IntMap<>();
|
||||
private static AsyncExecutor executor = new AsyncExecutor(4);
|
||||
|
||||
/**Sets the client loaded status, or whether it will recieve normal packets from the server.*/
|
||||
public static void setClientLoaded(boolean loaded){
|
||||
clientLoaded = loaded;
|
||||
}
|
||||
|
||||
@@ -96,6 +96,9 @@ public class JoinDialog extends FloatingDialog {
|
||||
}).width(w).height(80f).pad(4f).get();
|
||||
button.left();
|
||||
button.row();
|
||||
button.add("[lightgray]" + (a.players != 1 ? Bundles.format("text.players", a.players) :
|
||||
Bundles.format("text.players.single", a.players)));
|
||||
button.row();
|
||||
button.add("[lightgray]" + a.address + " / " + Vars.port).pad(4).left();
|
||||
|
||||
hosts.row();
|
||||
|
||||
@@ -102,7 +102,7 @@ public class WeaponBlocks{
|
||||
shootsound = "bigshot";
|
||||
rotatespeed = 0.2f;
|
||||
range = 120;
|
||||
reload = 70f;
|
||||
reload = 55f;
|
||||
bullet = BulletType.flak;
|
||||
shots = 3;
|
||||
inaccuracy = 9f;
|
||||
|
||||
Reference in New Issue
Block a user