Split Protocol version into Handshake vs Orders.

Handshake is kept at 7.
Orders is incremented to 8 to reflect immediate order changes.
This commit is contained in:
Paul Chote
2019-05-31 19:03:49 +00:00
committed by abcdefg30
parent fe41dcb45e
commit c6232f20f9
5 changed files with 30 additions and 9 deletions

View File

@@ -41,6 +41,10 @@ namespace OpenRA.Network
public string Version;
public string Password;
// Default value is hardcoded to 7 so that newer servers
// (which define OrdersProtocol > 7) can detect older clients
public int OrdersProtocol = 7;
// For player authentication
public string Fingerprint;
public string AuthSignature;
@@ -74,7 +78,7 @@ namespace OpenRA.Network
{
var data = new List<MiniYamlNode>();
data.Add(new MiniYamlNode("Handshake", null,
new string[] { "Mod", "Version", "Password", "Fingerprint", "AuthSignature" }.Select(p => FieldSaver.SaveField(this, p)).ToList()));
new[] { "Mod", "Version", "Password", "Fingerprint", "AuthSignature", "OrdersProtocol" }.Select(p => FieldSaver.SaveField(this, p)).ToList()));
data.Add(new MiniYamlNode("Client", FieldSaver.Save(Client)));
return data.WriteToString();