]> git.deb.at Git - rhonda/impostor.git/commitdiff
Fixes #154 - Used wrong version for serialization
authorAeonLucid <aeonlucid@outlook.com>
Sun, 15 Nov 2020 03:14:28 +0000 (04:14 +0100)
committerAeonLucid <aeonlucid@outlook.com>
Sun, 15 Nov 2020 03:14:28 +0000 (04:14 +0100)
src/Impostor.Api/Innersloth/GameOptionsData.cs

index 7be6735efe68135da3597c364cccc0602e6e03a0..d18efd8c53bd8d50aeab9c2aa075e9b8452ffb10 100644 (file)
@@ -9,7 +9,7 @@ namespace Impostor.Api.Innersloth
         /// <summary>
         /// The latest major version of the game client.
         /// </summary>
-        public const int LatestVersion = 2;
+        public const int LatestVersion = 4;
 
         /// <summary>
         /// Gets or sets host's version of the game.
@@ -33,7 +33,7 @@ namespace Impostor.Api.Innersloth
         /// Skeld = 0, MiraHQ = 1, Polus = 2.
         /// </remarks>
         internal byte MapId { get; set; }
-        
+
         /// <summary>
         /// Gets or sets the map selected for this lobby
         /// </summary>
@@ -192,13 +192,13 @@ namespace Impostor.Api.Innersloth
                 writer.Write((bool)VisualTasks);
             }
 
-            if (Version > 3)
+            if (version > 3)
             {
                 writer.Write((bool)AnonymousVotes);
                 writer.Write((byte)TaskBarUpdate);
             }
 
-            if (Version > 4)
+            if (version > 4)
             {
                 throw new ImpostorException($"Unknown GameOptionsData version {Version}.");
             }
@@ -258,4 +258,4 @@ namespace Impostor.Api.Innersloth
             }
         }
     }
-}
\ No newline at end of file
+}