diff --git a/README.md b/README.md index 7dd65c3fa..41ce1f816 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ The [Role Assignment](#role-assignment) sections explains how the roles are bein # Releases | Among Us - Version| Mod Version | Link | |----------|-------------|-----------------| +| 2022.2.23s| v3.4.4| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v3.4.4/TheOtherRoles.zip) | 2021.12.15s| v3.4.3| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v3.4.3/TheOtherRoles.zip) | 2021.12.15s| v3.4.2| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v3.4.2/TheOtherRoles.zip) | 2021.12.15s| v3.4.1| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v3.4.1/TheOtherRoles.zip) @@ -99,6 +100,9 @@ The [Role Assignment](#role-assignment) sections explains how the roles are bein
Click to show the Changelog +**Version 3.4.4** +- Fixed a bug where games were not finished properly on offical servers (special thanks to miniduikboot & 6pak) + **Version 3.4.3** - Fixed a bug where "Guesser Is Impostor Chance" crashed the role system - Fixed a bug where a sidekicked Hacker was stuck diff --git a/TheOtherRoles/Main.cs b/TheOtherRoles/Main.cs index 1e442f43c..e87ffbad7 100644 --- a/TheOtherRoles/Main.cs +++ b/TheOtherRoles/Main.cs @@ -21,8 +21,7 @@ namespace TheOtherRoles public class TheOtherRolesPlugin : BasePlugin { public const string Id = "me.eisbison.theotherroles"; - - public const string VersionString = "3.4.3"; + public const string VersionString = "3.4.4"; public static System.Version Version = System.Version.Parse(VersionString); internal static BepInEx.Logging.ManualLogSource Logger; @@ -52,7 +51,7 @@ public static void UpdateRegions() { ServerManager serverManager = DestroyableSingleton.Instance; IRegionInfo[] regions = defaultRegions; - var CustomRegion = new DnsRegionInfo(Ip.Value, "Custom", StringNames.NoTranslation, Ip.Value, Port.Value); + var CustomRegion = new DnsRegionInfo(Ip.Value, "Custom", StringNames.NoTranslation, Ip.Value, Port.Value, false); regions = regions.Concat(new IRegionInfo[] { CustomRegion.Cast() }).ToArray(); ServerManager.DefaultRegions = regions; serverManager.AvailableRegions = regions; diff --git a/TheOtherRoles/Patches/CustomServerPatch.cs b/TheOtherRoles/Patches/CustomServerPatch.cs deleted file mode 100644 index 006e59065..000000000 --- a/TheOtherRoles/Patches/CustomServerPatch.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Adapted from https://github.com/NuclearPowered/Reactor/blob/master/Reactor/Patches/ServerInfoFixes.cs -// Orginial code was written by 6pak and miniduikboot as part of the Reactor api for Among Us (https://github.com/NuclearPowered/Reactor) - -using HarmonyLib; -namespace TheOtherRoles.Patches -{ - [HarmonyPatch(typeof(InnerNet.InnerNetClient), nameof(InnerNet.InnerNetClient.GetConnectionData))] - public static class InnerNetClientGetConnectionDataPatch - { - public static void Prefix(ref bool useDtlsLayout) - { - var serverManager = ServerManager.Instance; - DnsRegionInfo region = serverManager.CurrentRegion.TryCast(); - if (region == null || !region.Fqdn.EndsWith("among.us")) - useDtlsLayout = false; - } - } - - [HarmonyPatch(typeof(AuthManager), nameof(AuthManager.CreateDtlsConnection))] - public static class AuthManagerCreateDtlsConnection - { - public static bool Prefix(ref Hazel.Udp.UnityUdpClientConnection __result, string targetIp, ushort targetPort) - { - var serverManager = ServerManager.Instance; - DnsRegionInfo region = serverManager.CurrentRegion.TryCast(); - if (region == null || !region.Fqdn.EndsWith("among.us")) { - var remoteEndPoint = new Il2CppSystem.Net.IPEndPoint(Il2CppSystem.Net.IPAddress.Parse(targetIp), (int)(targetPort - 3)); - __result = new Hazel.Udp.UnityUdpClientConnection(null, remoteEndPoint); - return false; - } - return true; - } - } -} \ No newline at end of file diff --git a/TheOtherRoles/TheOtherRoles.csproj b/TheOtherRoles/TheOtherRoles.csproj index 0d40409cf..4db5fc3b0 100644 --- a/TheOtherRoles/TheOtherRoles.csproj +++ b/TheOtherRoles/TheOtherRoles.csproj @@ -1,7 +1,7 @@ - + netstandard2.1 - 3.4.3 + 3.4.4 TheOtherRoles Eisbison