From 5d729c1e8d50cb32014488f1b7f3a7e60646e552 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 19 Sep 2019 23:46:27 -0400 Subject: [PATCH] Bugfixes --- core/src/io/anuke/mindustry/core/NetServer.java | 8 +------- core/src/io/anuke/mindustry/ui/dialogs/PausedDialog.java | 2 +- .../src/io/anuke/mindustry/desktop/DesktopLauncher.java | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/core/src/io/anuke/mindustry/core/NetServer.java b/core/src/io/anuke/mindustry/core/NetServer.java index 74caa7e884..c2048b9837 100644 --- a/core/src/io/anuke/mindustry/core/NetServer.java +++ b/core/src/io/anuke/mindustry/core/NetServer.java @@ -704,16 +704,10 @@ public class NetServer implements ApplicationListener{ //iterate through each player for(int i = 0; i < playerGroup.size(); i++){ Player player = playerGroup.all().get(i); - if(player.isLocal) continue; + if(player.isLocal || player.con == null) continue; NetConnection connection = player.con; - if(connection == null || !connection.isConnected()){ - //player disconnected, call d/c event - onDisconnect(player, "disappeared"); - return; - } - if(!player.timer.get(Player.timerSync, serverSyncTime) || !connection.hasConnected) continue; writeSnapshot(player); diff --git a/core/src/io/anuke/mindustry/ui/dialogs/PausedDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/PausedDialog.java index aaf1e63d49..75edf6df92 100644 --- a/core/src/io/anuke/mindustry/ui/dialogs/PausedDialog.java +++ b/core/src/io/anuke/mindustry/ui/dialogs/PausedDialog.java @@ -67,7 +67,7 @@ public class PausedDialog extends FloatingDialog{ ui.host.show(); } } - }).disabled(b -> net.active() && !steam).colspan(2).width(dw * 2 + 20f).update(e -> e.setText(net.active() && steam ? "$invitefriends" : "$hostserver")); + }).disabled(b -> net.active() && !steam).colspan(2).width(dw * 2 + 20f).update(e -> e.setText(net.active() && steam && net.server() ? "$invitefriends" : "$hostserver")); } cont.row(); diff --git a/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java b/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java index d215e28d9c..c253ed3a03 100644 --- a/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java +++ b/desktop/src/io/anuke/mindustry/desktop/DesktopLauncher.java @@ -143,7 +143,7 @@ public class DesktopLauncher extends ClientLauncher{ SVars.user = new SUser(); Events.on(ClientLoadEvent.class, event -> { - player.name = SVars.net.friends.getPersonaName(); + player.name = "ffmpeg";//SVars.net.friends.getPersonaName(); Core.settings.defaults("name", SVars.net.friends.getPersonaName()); Core.settings.put("name", player.name); Core.settings.save();