Mod 2.8.1: separate mod version from network protocol version
ModVersion (2.8.1, shown in MSCLoader/MSC Launcher) and ProtocolVersion (2.8) are separate; only the first two digits are compared (P2P host, Steam lobby, server info, server browser) and only the protocol version is sent, so minor updates stay compatible with 2.8 servers, hosts and players. README: how to publish minor and major updates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -164,7 +164,7 @@ namespace MSCO
|
||||
return;
|
||||
}
|
||||
LobbyId = new CSteamID(result.m_ulSteamIDLobby);
|
||||
SteamMatchmaking.SetLobbyData(LobbyId, VersionKey, MSCO.ModVersion);
|
||||
SteamMatchmaking.SetLobbyData(LobbyId, VersionKey, MSCO.ProtocolVersion); // ältere Mods vergleichen genau
|
||||
if (Created != null) Created(LobbyId);
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ namespace MSCO
|
||||
LobbyId = new CSteamID(result.m_ulSteamIDLobby);
|
||||
|
||||
string hostVersion = SteamMatchmaking.GetLobbyData(LobbyId, VersionKey);
|
||||
if (!string.IsNullOrEmpty(hostVersion) && hostVersion != MSCO.ModVersion)
|
||||
if (!string.IsNullOrEmpty(hostVersion) && !MSCO.Compatible(hostVersion))
|
||||
{
|
||||
Leave();
|
||||
Fail("Version mismatch (host " + hostVersion + ", you " + MSCO.ModVersion + ")");
|
||||
|
||||
Reference in New Issue
Block a user