This commit is contained in:
Tranqlmao committed 2026-11-26 14:06:47 -05:00
1 parent 263d43905e
commit 2f7b5c9f2b
4 files changed
+6 -2

No files matched your search

@@ -391,7 +391,7 @@ bool Win64_GetJoinAddress(std::string& host, int& port) {
}
int CPlatformNetworkManagerWindows::GetHostedPort() const {
return (m_isHost && !m_isLeaving && m_listenSocket != INVALID_SOCKET) ? static_cast<int>(m_gamePort) : 0;
return (m_isHost && m_isOnlineHost && !m_isLeaving && m_listenSocket != INVALID_SOCKET) ? static_cast<int>(m_gamePort) : 0;
}
bool CPlatformNetworkManagerWindows::GetJoinAddress(std::string& host, int& port) const {
@@ -421,6 +421,7 @@ static bool ResolveFriendSession(FriendSessionInfo* session) {
bool CPlatformNetworkManagerWindows::Initialise(CGameNetworkManager* pGameNetworkManager, int flagIndexSize) {
s_windowsNetworkManager = this;
m_joinPort = 0;
m_isOnlineHost = false;
m_gameNetworkManager = pGameNetworkManager;
m_flagIndexSize = flagIndexSize;
@@ -865,6 +866,7 @@ bool CPlatformNetworkManagerWindows::IsAddingPlayer() { return false; }
void CPlatformNetworkManagerWindows::HostGame(int localUsersMask, bool bOnlineGame, bool bIsPrivate, unsigned char publicSlots, unsigned char privateSlots) {
SetLocalGame(true);
m_isOnlineHost = bOnlineGame && !g_Win64DedicatedServer;
SetPrivateGame(bIsPrivate);
m_isLeaving = false;