Skip to content

Commit 4acae61

Browse files
Set packet router slot to the first player in fallback list
1 parent 4b359f0 commit 4acae61

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

Generals/Code/GameEngine/Source/GameNetwork/ConnectionManager.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1917,6 +1917,13 @@ void ConnectionManager::parseUserList(const GameInfo *game)
19171917
TheMemoryPoolFactory->debugSetInitFillerIndex(m_localSlot);
19181918
#endif
19191919

1920+
// Set the packet router slot to the first player (packet router fallback[0])
1921+
// This fixes the issue where m_packetRouterSlot was hardcoded to 0 and never updated
1922+
if (numUsers > 0) {
1923+
m_packetRouterSlot = m_packetRouterFallback[0];
1924+
DEBUG_LOG(("Packet router slot set to %d", m_packetRouterSlot));
1925+
}
1926+
19201927
/*
19211928
if ( numUsers < 2 || m_localSlot == -1 )
19221929
{

GeneralsMD/Code/GameEngine/Source/GameNetwork/ConnectionManager.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1979,6 +1979,13 @@ void ConnectionManager::parseUserList(const GameInfo *game)
19791979
TheMemoryPoolFactory->debugSetInitFillerIndex(m_localSlot);
19801980
#endif
19811981

1982+
// Set the packet router slot to the first player (packet router fallback[0])
1983+
// This fixes the issue where m_packetRouterSlot was hardcoded to 0 and never updated
1984+
if (numUsers > 0) {
1985+
m_packetRouterSlot = m_packetRouterFallback[0];
1986+
DEBUG_LOG(("Packet router slot set to %d", m_packetRouterSlot));
1987+
}
1988+
19821989
/*
19831990
if ( numUsers < 2 || m_localSlot == -1 )
19841991
{

0 commit comments

Comments
 (0)