forked from cafeberry/cafeberry
LCEMP Commit: add dedicated server check to sessioninfo
This commit is contained in:
@@ -354,6 +354,10 @@ bool CPlatformNetworkManagerStub::LeaveGame(bool bMigrateHost)
|
||||
if( m_bLeavingGame ) return true;
|
||||
|
||||
m_bLeavingGame = true;
|
||||
|
||||
extern bool g_connectedToDedicatedServer;
|
||||
g_connectedToDedicatedServer = false;
|
||||
|
||||
NetworkSocketLayer::StopAdvertising();
|
||||
|
||||
// If we are the host wait for the game server to end
|
||||
@@ -403,10 +407,10 @@ void CPlatformNetworkManagerStub::HostGame(int localUsersMask, bool bOnlineGame,
|
||||
IQNet::m_player[0].m_smallId = 0;
|
||||
IQNet::m_player[0].m_isRemote = false;
|
||||
IQNet::m_player[0].m_isHostPlayer = true;
|
||||
#ifdef _WINDOWS64
|
||||
IQNet::s_playerCount = 1;
|
||||
#if defined _WINDOWS64 && !defined WITH_SERVER_CODE
|
||||
extern wchar_t g_Win64UsernameW[17];
|
||||
wcscpy_s(IQNet::m_player[0].m_gamertag, 32, g_Win64UsernameW);
|
||||
IQNet::s_playerCount = 1;
|
||||
#endif
|
||||
|
||||
if (getNetworkPlayer(&IQNet::m_player[0]) == NULL)
|
||||
@@ -454,6 +458,9 @@ int CPlatformNetworkManagerStub::JoinGame(FriendSessionInfo *searchResult, int l
|
||||
wcsncpy(IQNet::m_player[0].m_gamertag, searchResult->data.hostName, 31);
|
||||
IQNet::m_player[0].m_gamertag[31] = L'\0';
|
||||
|
||||
extern bool g_connectedToDedicatedServer;
|
||||
g_connectedToDedicatedServer = searchResult->data.isDedicatedServer;
|
||||
|
||||
NetworkSocketLayer::StopDiscovery();
|
||||
|
||||
if (!NetworkSocketLayer::JoinGame(hostIP, hostPort))
|
||||
@@ -801,6 +808,7 @@ void CPlatformNetworkManagerStub::SearchForGames()
|
||||
info->data.subTexturePackId = lanSessions[i].subTexturePackId;
|
||||
info->data.isReadyToJoin = lanSessions[i].isJoinable;
|
||||
info->data.isJoinable = lanSessions[i].isJoinable;
|
||||
info->data.isDedicatedServer = lanSessions[i].isDedicatedServer;
|
||||
strncpy(info->data.hostIP, lanSessions[i].hostIP, sizeof(info->data.hostIP) - 1);
|
||||
info->data.hostIP[sizeof(info->data.hostIP) - 1] = '\0';
|
||||
info->data.hostPort = lanSessions[i].hostPort;
|
||||
|
||||
Reference in New Issue
Block a user