# 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)
<details>
<summary>Click to show the Changelog</summary>
+**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
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;
ServerManager serverManager = DestroyableSingleton<ServerManager>.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<IRegionInfo>() }).ToArray();
ServerManager.DefaultRegions = regions;
serverManager.AvailableRegions = regions;
+++ /dev/null
-// 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<DnsRegionInfo>();
- 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<DnsRegionInfo>();
- 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
-<Project Sdk="Microsoft.NET.Sdk">
+<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
- <Version>3.4.3</Version>
+ <Version>3.4.4</Version>
<Description>TheOtherRoles</Description>
<Authors>Eisbison</Authors>
</PropertyGroup>