Fixed local games sometimes not being found on Steam

This commit is contained in:
Anuken 2021-03-31 09:42:44 -04:00
parent 179cedd6cc
commit 6ebabbb56a

View File

@ -320,6 +320,7 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
for(int i = 0; i < matches; i++){
try{
SteamID lobby = smat.getLobbyByIndex(i);
String mode = smat.getLobbyData(lobby, "gamemode");
Host out = new Host(
-1, //invalid ping
smat.getLobbyData(lobby, "name"),
@ -329,7 +330,7 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
smat.getNumLobbyMembers(lobby),
Strings.parseInt(smat.getLobbyData(lobby, "version"), -1),
smat.getLobbyData(lobby, "versionType"),
Gamemode.valueOf(smat.getLobbyData(lobby, "gamemode")),
mode == null || mode.isEmpty() ? Gamemode.survival : Gamemode.valueOf(mode),
smat.getLobbyMemberLimit(lobby),
"",
null