Fix freeplay

This commit is contained in:
js6pak committed 2021-11-11 11:35:30 +01:00
1 parent 40ae06899c
commit d9e5e7f1a9
2 files changed
+8 -2

No files matched your search

+2 -2
View File
@@ -158,7 +158,7 @@ namespace Reactor.Networking.Patches
{
ModList.Update();
var handshake = MessageWriter.Get(SendOption.Reliable);
var handshake = new MessageWriter(1000);
handshake.Write(__result);
@@ -167,7 +167,7 @@ namespace Reactor.Networking.Patches
ModList.Current!.Count
);
__result = handshake.ToByteArray(false);
__result = handshake.ToByteArray(true);
handshake.Recycle();
}
}
+6
View File
@@ -15,6 +15,12 @@ namespace Reactor.Patches
{
public static void Prefix(ref bool useDtlsLayout)
{
if (AmongUsClient.Instance.GameMode != GameModes.OnlineGame)
{
useDtlsLayout = false;
return;
}
var serverManager = ServerManager.Instance;
if (!serverManager || serverManager.CurrentRegion?.TryCast<DnsRegionInfo>() is not { } regionInfo || !regionInfo.Fqdn.EndsWith("among.us"))
{