/// <summary> /// Used when a lobby join is manually received and game is being started afterwards. /// </summary> /// <param name="lobby"></param> public void forceJoinLobbyChangeServer(string lobby) { ulong vOut = Convert.ToUInt64(lobby); m_Lobby = (CSteamID)vOut; SteamMatchmakingTest.gameServer tempServer = SteamManager.SteamMatchmakingClass.getLobbyInfo(m_Lobby); //(CSteamID)pCallback.m_steamIDLobby.m_SteamID //pCallback.m_steamIDLobby Console.WriteLine("[" + GameLobbyJoinRequested_t.k_iCallback + " - SERVER INFO: IP] - " + tempServer.GameServerIP + " -- Port: " + tempServer.GameServerPort); YargisSteam.Log += "[" + GameLobbyJoinRequested_t.k_iCallback + " - SERVER INFO: IP] - " + tempServer.GameServerIP + " -- Port: " + tempServer.GameServerPort + "\n"; if (tempServer.GameServerIP > 0) { if (OnChangeServer != null) { OnChangeServer(tempServer.GameServerIP, tempServer.GameServerPort, "");//YargisSteam.ChangeServer(tempServer.GameServerIP, tempServer.GameServerPort, ""); } SteamFriendsA.waitingForLobbyJoin = false; } }
void OnLobbyEnter(LobbyEnter_t pCallback) { Console.WriteLine("[" + LobbyEnter_t.k_iCallback + " - LobbyEnter] - " + pCallback.m_ulSteamIDLobby + " -- " + pCallback.m_rgfChatPermissions + " -- " + pCallback.m_bLocked + " -- " + pCallback.m_EChatRoomEnterResponse); //TODO: We can remove the log entry once we get lobby enters working by clicking on a user and telling it to join game YargisSteam.Log += "LobbyEnter: " + LobbyEnter_t.k_iCallback + " - LobbyEnter] - " + pCallback.m_ulSteamIDLobby + "\n"; m_Lobby = (CSteamID)pCallback.m_ulSteamIDLobby; if (SteamFriendsA.waitingForLobbyJoin == true) { SteamMatchmakingTest.gameServer tempServer = SteamManager.SteamMatchmakingClass.getLobbyInfo(m_Lobby); //(CSteamID)pCallback.m_steamIDLobby.m_SteamID //pCallback.m_steamIDLobby Console.WriteLine("[" + GameLobbyJoinRequested_t.k_iCallback + " - SERVER INFO: IP] - " + tempServer.GameServerIP + " -- Port: " + tempServer.GameServerPort); if (tempServer.GameServerIP > 0) { if (OnChangeServer != null) { OnChangeServer(tempServer.GameServerIP, tempServer.GameServerPort, ""); } //YargisSteam.ChangeServer(tempServer.GameServerIP, tempServer.GameServerPort, ""); SteamFriendsA.waitingForLobbyJoin = false; } } }