Minor bugfixes

This commit is contained in:
Anuken
2019-10-25 14:00:38 -04:00
parent ad5cdebca8
commit bd0a6636e6
2 changed files with 9 additions and 1 deletions

View File

@@ -182,7 +182,7 @@ public class DesktopInput extends InputHandler{
mode = none; mode = none;
} }
if(mode != none){ if(mode != none || isPlacing()){
selectRequests.clear(); selectRequests.clear();
lastSchematic = null; lastSchematic = null;
} }

View File

@@ -9,6 +9,7 @@ import io.anuke.arc.collection.*;
import io.anuke.arc.function.*; import io.anuke.arc.function.*;
import io.anuke.arc.util.*; import io.anuke.arc.util.*;
import io.anuke.arc.util.pooling.*; import io.anuke.arc.util.pooling.*;
import io.anuke.mindustry.core.GameState.*;
import io.anuke.mindustry.core.Version; import io.anuke.mindustry.core.Version;
import io.anuke.mindustry.game.EventType.*; import io.anuke.mindustry.game.EventType.*;
import io.anuke.mindustry.game.*; import io.anuke.mindustry.game.*;
@@ -245,6 +246,13 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
return; return;
} }
if(net.active()){
net.disconnect();
net.closeServer();
logic.reset();
state.set(State.menu);
}
currentLobby = steamIDLobby; currentLobby = steamIDLobby;
currentServer = smat.getLobbyOwner(steamIDLobby); currentServer = smat.getLobbyOwner(steamIDLobby);