]> git.deb.at Git - rhonda/impostor.git/commitdiff
Fix ServerReplay
authorjs6pak <kubastaron@hotmail.com>
Sat, 13 Nov 2021 18:51:52 +0000 (19:51 +0100)
committerjs6pak <kubastaron@hotmail.com>
Sat, 13 Nov 2021 18:51:52 +0000 (19:51 +0100)
src/Impostor.Api/Innersloth/PlatformSpecificData.cs
src/Impostor.Tools.ServerReplay/Program.cs

index 807f626bfa5fce9c58f6146265888a8b1138c50d..61f1aeb21b8bf5cd3b4ae08247bdb185e5c0faf7 100644 (file)
@@ -5,6 +5,14 @@ namespace Impostor.Api.Innersloth
 {
     public class PlatformSpecificData
     {
+        public PlatformSpecificData(Platforms platform, string platformName, ulong? xboxPlatformId = null, ulong? psnPlatformId = null)
+        {
+            Platform = platform;
+            PlatformName = platformName;
+            XboxPlatformId = xboxPlatformId;
+            PsnPlatformId = psnPlatformId;
+        }
+
         public PlatformSpecificData(IMessageReader reader)
         {
             Platform = (Platforms)reader.Tag;
index 78c5b78f6b225d920b62d904854b3a7202408b26..c55b1933ad655b7c904263337e2499c553cc1791 100644 (file)
@@ -170,7 +170,7 @@ namespace Impostor.Tools.ServerReplay
                     // Create and register connection.
                     var connection = new MockHazelConnection(address);
 
-                    await _clientManager.RegisterConnectionAsync(connection, name, gameVersion, Language.English, QuickChatModes.FreeChatOrQuickChat);
+                    await _clientManager.RegisterConnectionAsync(connection, name, gameVersion, Language.English, QuickChatModes.FreeChatOrQuickChat, new PlatformSpecificData(Platforms.Unknown, "ServerReplay"));
 
                     // Store reference for ourselfs.
                     Connections.Add(clientId, connection);
@@ -200,7 +200,7 @@ namespace Impostor.Tools.ServerReplay
 
                     if (tag == MessageFlags.HostGame)
                     {
-                        GameOptions.Add(clientId, Message00HostGameC2S.Deserialize(message, out _));
+                        GameOptions.Add(clientId, Message00HostGameC2S.Deserialize(message));
                     }
                     else if (Connections.TryGetValue(clientId, out var client))
                     {