This commit is contained in:
Anuken
2020-09-22 12:16:17 -04:00
parent b2b8949e26
commit 08ff36c43e
12 changed files with 21 additions and 6 deletions

View File

@@ -233,7 +233,7 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
@Override
public void onLobbyEnter(SteamID steamIDLobby, int chatPermissions, boolean blocked, ChatRoomEnterResponse response){
Log.info("enter lobby @ @", steamIDLobby.getAccountID(), response);
Log.info("onLobbyEnter @ @", steamIDLobby.getAccountID(), response);
if(response != ChatRoomEnterResponse.Success){
ui.loadfrag.hide();
@@ -241,6 +241,17 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
return;
}
int version = Strings.parseInt(smat.getLobbyData(steamIDLobby, "version"), -1);
//check version
if(version != Version.build){
ui.loadfrag.hide();
ui.showInfo("[scarlet]" + (version > Version.build ? KickReason.clientOutdated : KickReason.serverOutdated).toString() + "\n[]" +
Core.bundle.format("server.versions", Version.build, version));
smat.leaveLobby(steamIDLobby);
return;
}
logic.reset();
net.reset();