Various bugfixes
This commit is contained in:
@@ -15,6 +15,7 @@ import io.anuke.mindustry.entities.Player;
|
||||
import io.anuke.mindustry.entities.traits.BuilderTrait.BuildRequest;
|
||||
import io.anuke.mindustry.entities.traits.SyncTrait;
|
||||
import io.anuke.mindustry.entities.traits.TypeTrait;
|
||||
import io.anuke.mindustry.game.Version;
|
||||
import io.anuke.mindustry.gen.Call;
|
||||
import io.anuke.mindustry.gen.RemoteReadClient;
|
||||
import io.anuke.mindustry.net.Net;
|
||||
@@ -95,6 +96,7 @@ public class NetClient extends Module{
|
||||
ConnectPacket c = new ConnectPacket();
|
||||
c.name = player.name;
|
||||
c.mobile = mobile;
|
||||
c.versionType = Version.type;
|
||||
c.color = Color.rgba8888(player.color);
|
||||
c.usid = getUsid(packet.addressTCP);
|
||||
c.uuid = Platform.instance.getUUID();
|
||||
|
||||
@@ -120,7 +120,7 @@ public class NetServer extends Module{
|
||||
return;
|
||||
}
|
||||
|
||||
if((packet.version == -1 || !packet.versionType.equals("official")) && Version.build != -1 && !admins.allowsCustomClients()){
|
||||
if(packet.versionType == null || ((packet.version == -1 || !packet.versionType.equals("official")) && Version.build != -1 && !admins.allowsCustomClients())){
|
||||
kick(id, KickReason.customClient);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ public class HostDialog extends FloatingDialog{
|
||||
content().table(t -> {
|
||||
t.add("$text.name").padRight(10);
|
||||
t.addField(Settings.getString("name"), text -> {
|
||||
if(text.isEmpty()) return;
|
||||
player.name = text;
|
||||
Settings.put("name", text);
|
||||
Settings.save();
|
||||
|
||||
@@ -205,7 +205,6 @@ public class JoinDialog extends FloatingDialog{
|
||||
content().table(t -> {
|
||||
t.add("$text.name").padRight(10);
|
||||
t.addField(Settings.getString("name"), text -> {
|
||||
if(text.isEmpty()) return;
|
||||
player.name = text;
|
||||
Settings.put("name", text);
|
||||
Settings.save();
|
||||
|
||||
Reference in New Issue
Block a user