From bd0a6636e61bc94884272fc62e7324f717e9e995 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 25 Oct 2019 14:00:38 -0400 Subject: [PATCH] Minor bugfixes --- core/src/io/anuke/mindustry/input/DesktopInput.java | 2 +- desktop/src/io/anuke/mindustry/desktop/steam/SNet.java | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/core/src/io/anuke/mindustry/input/DesktopInput.java b/core/src/io/anuke/mindustry/input/DesktopInput.java index b44d85da28..3948f0efad 100644 --- a/core/src/io/anuke/mindustry/input/DesktopInput.java +++ b/core/src/io/anuke/mindustry/input/DesktopInput.java @@ -182,7 +182,7 @@ public class DesktopInput extends InputHandler{ mode = none; } - if(mode != none){ + if(mode != none || isPlacing()){ selectRequests.clear(); lastSchematic = null; } diff --git a/desktop/src/io/anuke/mindustry/desktop/steam/SNet.java b/desktop/src/io/anuke/mindustry/desktop/steam/SNet.java index 16bb25ff67..4e4e8e680b 100644 --- a/desktop/src/io/anuke/mindustry/desktop/steam/SNet.java +++ b/desktop/src/io/anuke/mindustry/desktop/steam/SNet.java @@ -9,6 +9,7 @@ import io.anuke.arc.collection.*; import io.anuke.arc.function.*; import io.anuke.arc.util.*; import io.anuke.arc.util.pooling.*; +import io.anuke.mindustry.core.GameState.*; import io.anuke.mindustry.core.Version; import io.anuke.mindustry.game.EventType.*; import io.anuke.mindustry.game.*; @@ -245,6 +246,13 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback, return; } + if(net.active()){ + net.disconnect(); + net.closeServer(); + logic.reset(); + state.set(State.menu); + } + currentLobby = steamIDLobby; currentServer = smat.getLobbyOwner(steamIDLobby);