Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -75,6 +75,7 @@ public class NetClient implements ApplicationListener{
|
|||||||
|
|
||||||
ConnectPacket c = new ConnectPacket();
|
ConnectPacket c = new ConnectPacket();
|
||||||
c.name = player.name;
|
c.name = player.name;
|
||||||
|
c.locale = Core.settings.getString("locale");
|
||||||
c.mods = mods.getModStrings();
|
c.mods = mods.getModStrings();
|
||||||
c.mobile = mobile;
|
c.mobile = mobile;
|
||||||
c.versionType = Version.type;
|
c.versionType = Version.type;
|
||||||
|
|||||||
@@ -195,6 +195,10 @@ public class NetServer implements ApplicationListener{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(packet.locale == null){
|
||||||
|
packet.locale = "en_US";
|
||||||
|
}
|
||||||
|
|
||||||
String ip = con.address;
|
String ip = con.address;
|
||||||
|
|
||||||
admins.updatePlayerJoined(uuid, ip, packet.name);
|
admins.updatePlayerJoined(uuid, ip, packet.name);
|
||||||
@@ -215,6 +219,7 @@ public class NetServer implements ApplicationListener{
|
|||||||
player.con.uuid = uuid;
|
player.con.uuid = uuid;
|
||||||
player.con.mobile = packet.mobile;
|
player.con.mobile = packet.mobile;
|
||||||
player.name = packet.name;
|
player.name = packet.name;
|
||||||
|
player.locale = packet.locale;
|
||||||
player.color.set(packet.color).a(1f);
|
player.color.set(packet.color).a(1f);
|
||||||
|
|
||||||
//save admin ID but don't overwrite it
|
//save admin ID but don't overwrite it
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
|
|||||||
boolean admin;
|
boolean admin;
|
||||||
@SyncLocal float mouseX, mouseY;
|
@SyncLocal float mouseX, mouseY;
|
||||||
String name = "noname";
|
String name = "noname";
|
||||||
|
String locale = "en";
|
||||||
Color color = new Color();
|
Color color = new Color();
|
||||||
|
|
||||||
transient float deathTimer;
|
transient float deathTimer;
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ public class Packets{
|
|||||||
public int version;
|
public int version;
|
||||||
public String versionType;
|
public String versionType;
|
||||||
public Seq<String> mods;
|
public Seq<String> mods;
|
||||||
public String name, uuid, usid;
|
public String name, locale, uuid, usid;
|
||||||
public boolean mobile;
|
public boolean mobile;
|
||||||
public int color;
|
public int color;
|
||||||
|
|
||||||
@@ -169,6 +169,7 @@ public class Packets{
|
|||||||
buffer.putInt(Version.build);
|
buffer.putInt(Version.build);
|
||||||
TypeIO.writeString(buffer, versionType);
|
TypeIO.writeString(buffer, versionType);
|
||||||
TypeIO.writeString(buffer, name);
|
TypeIO.writeString(buffer, name);
|
||||||
|
TypeIO.writeString(buffer, locale);
|
||||||
TypeIO.writeString(buffer, usid);
|
TypeIO.writeString(buffer, usid);
|
||||||
|
|
||||||
byte[] b = Base64Coder.decode(uuid);
|
byte[] b = Base64Coder.decode(uuid);
|
||||||
@@ -190,6 +191,7 @@ public class Packets{
|
|||||||
version = buffer.getInt();
|
version = buffer.getInt();
|
||||||
versionType = TypeIO.readString(buffer);
|
versionType = TypeIO.readString(buffer);
|
||||||
name = TypeIO.readString(buffer);
|
name = TypeIO.readString(buffer);
|
||||||
|
locale = TypeIO.readString(buffer);
|
||||||
usid = TypeIO.readString(buffer);
|
usid = TypeIO.readString(buffer);
|
||||||
byte[] idbytes = new byte[16];
|
byte[] idbytes = new byte[16];
|
||||||
buffer.get(idbytes);
|
buffer.get(idbytes);
|
||||||
|
|||||||
Reference in New Issue
Block a user