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:
2026-10-02 17:48:07 +02:00
co-authored by Claude Opus 5.5
parent f707e67e5c
commit ea1b0f74d9
6 changed files with 46 additions and 10 deletions
+3 -3
View File
@@ -675,7 +675,7 @@ namespace MSCO
string name = string.IsNullOrEmpty(displayName) ? info.Name : displayName;
int max = info.MaxPlayers > 0 ? info.MaxPlayers : maxPlayers;
if (info.Version != MSCO.ModVersion)
if (!MSCO.Compatible(info.Version))
{
PendingVersionWarning = new VersionWarning { Host = host, Port = port, Name = name, MaxPlayers = max, ServerVersion = info.Version };
SetStatus("Version mismatch: server v" + info.Version + ", you v" + MSCO.ModVersion);
@@ -1064,7 +1064,7 @@ namespace MSCO
byte[] ticket = SteamLobby.CreateAuthTicket();
session.SendTo(NetSession.HostId, MsgType.Hello, NetSession.Build(w =>
{
w.Write(MSCO.ModVersion);
w.Write(MSCO.ProtocolVersion); // nur die Netzwerk-Version: ältere Hosts vergleichen genau
w.Write(name);
// Steam-Identität: dedizierte Server lassen nur Spieler mit Steam rein
w.Write(SteamLobby.OwnSteamId);
@@ -1392,7 +1392,7 @@ namespace MSCO
string version = r.ReadString();
string name = r.ReadString();
if (version != MSCO.ModVersion)
if (!MSCO.Compatible(version))
{
Reject(peerId, "Version mismatch (host " + MSCO.ModVersion + ", you " + version + ")");
return;