Skip to content

Commit 6f41bfe

Browse files
committed
- Plugin fix + latest version
1 parent 0ad2700 commit 6f41bfe

2 files changed

Lines changed: 21 additions & 8 deletions

File tree

‎GeneralsMD/Code/GameEngine/Include/GameNetwork/GeneralsOnline/NextGenMP_defines.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//#define USE_MAULLER_ONEDRIVE_FIX 1
1414
//#define USE_STUBBJAX_TRANSPORT_CONTAIN_FIX 1
1515

16-
#define GENERALS_ONLINE_VERSION_STRING "100126" // NOTE: Format is critical here for Sentry to work
16+
#define GENERALS_ONLINE_VERSION_STRING "100126_QFE2" // NOTE: Format is critical here for Sentry to work
1717

1818
#define GENERALS_ONLINE_DISABLE_TEXTURE_FILTERING_AND_AA 1
1919

‎GeneralsMD/Code/GameEngine/Source/GameNetwork/GeneralsOnline/NetworkMesh.cpp‎

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,16 @@ NetworkMesh::NetworkMesh()
731731
return;
732732
}
733733

734+
// When the anti-cheat plugin owns the transport, no Steam connection is ever
735+
// created or accepted by this mesh - StartConnectionSignalling() goes
736+
// straight to the plugin. Taking a Steam listen socket we never use only
737+
// risks colliding with a previous mesh on P2P vport 0, so skip it.
738+
if (AnticheatPlugInterface::DoesACPluginProvideSecureGameTransport())
739+
{
740+
m_bInitialized = true;
741+
return;
742+
}
743+
734744
std::vector<SteamNetworkingConfigValue_t> vecListenOpts;
735745
SteamNetworkingConfigValue_t opt;
736746
opt.SetInt32(k_ESteamNetworkingConfig_SymmetricConnect, 1);
@@ -1124,15 +1134,18 @@ void NetworkMesh::Disconnect()
11241134
{
11251135
AnticheatPlugInterface::DisconnectAll();
11261136
}
1127-
else
1128-
{
1129-
if (SteamNetworkingSockets() && m_hListenSock != k_HSteamListenSocket_Invalid)
1130-
{
1131-
SteamNetworkingSockets()->CloseListenSocket(m_hListenSock);
1132-
}
11331137

1134-
m_hListenSock = k_HSteamListenSocket_Invalid;
1138+
// The listen socket is created unconditionally in the constructor, so it must
1139+
// be released unconditionally too. Skipping this when the anti-cheat plugin
1140+
// owns the transport leaks the socket, and the next NetworkMesh then fails
1141+
// with "Already have a listen socket on P2P vport 0" - which makes
1142+
// IsInitialized() false and aborts the second lobby join.
1143+
if (SteamNetworkingSockets() && m_hListenSock != k_HSteamListenSocket_Invalid)
1144+
{
1145+
SteamNetworkingSockets()->CloseListenSocket(m_hListenSock);
11351146
}
1147+
1148+
m_hListenSock = k_HSteamListenSocket_Invalid;
11361149
}
11371150

11381151
void NetworkMesh::Tick()

0 commit comments

Comments
 (0)